The International Simutrans Forum

Development => Patches & Projects => Topic started by: Dwachs on November 16, 2008, 02:02:17 PM

Title: patch: fix of depot and schedule dialog
Post by: Dwachs 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
Title: Re: patch: fix of depot and schedule dialog
Post by: z9999 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
Title: Re: patch: fix of depot and schedule dialog
Post by: Dwachs 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.
Title: Re: patch: fix of depot and schedule dialog
Post by: Dwachs on November 18, 2008, 07:33:01 PM
patch updated :) see first post. Is there any interest in this patch from the developers side?
Title: Re: patch: fix of depot and schedule dialog
Post by: Dwachs 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.