The International Simutrans Forum

 

Author Topic: patch: fix of depot and schedule dialog  (Read 3196 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4898
  • Languages: EN, DE, AT
patch: fix of depot and schedule dialog
« on: November 16, 2008, 02:02:17 PM »
.. this patch fixes the following bug(s) that can be produced in the following way
-- open depot dialog or vehicle - schedule dialog
-- open line management and delete a line
-- in the yet open dialogs (depot / schedule) it was possible to select or rename the deleted line, which leads to unexpected behaviour (ie crash)

The patch
-- contains a container class that stores line-names (it is possible to select or edit names of deleted lines, but this class will recognize this)
-- unifies the line selection components in the depot and schedule dialogs

Edit:
-- forget to svn-add new files
-- change in schedule-list to cope with the changes in gui_scrolled_list

Edit2:
-- updated to 2127
« Last Edit: November 21, 2008, 12:53:37 PM by Dwachs »

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: patch: fix of depot and schedule dialog
« Reply #1 on: November 18, 2008, 07:22:27 AM »
I don't know you can reproduce this or not.

1. Open vehicle shedule window
2. Click line name field
3. Select empty space
4. Click line name field again
5. Input text from keyboard

Result:
Crash

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4898
  • Languages: EN, DE, AT
Re: patch: fix of depot and schedule dialog
« Reply #2 on: November 18, 2008, 07:26:48 AM »
does this bug appear also without my patch? I will look into it in the evening.

edit: the gui_scrolled_list delivers the value selection=-1 if one clicks below in the empty spot. This results in an empty string delivered to the gui_textinput. Since gui_textinput_t has no own buffer, writing in this empty string (only 1 byte allocated) gives errors.

I will update the patch later.
« Last Edit: November 18, 2008, 12:00:48 PM by Dwachs »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4898
  • Languages: EN, DE, AT
Re: patch: fix of depot and schedule dialog
« Reply #3 on: November 18, 2008, 07:33:01 PM »
patch updated :) see first post. Is there any interest in this patch from the developers side?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4898
  • Languages: EN, DE, AT
Re: patch: fix of depot and schedule dialog
« Reply #4 on: November 22, 2008, 02:11:38 PM »
small patch for depot-dialog (glitch appears if a line is deleted that is selected in the depot.