The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: Matthew on May 25, 2022, 05:49:46 AM

Title: [BUG] Daughter windows cannot be opened from Depot Window
Post by: Matthew on May 25, 2022, 05:49:46 AM
Steps to reproduce

1. Build and open a depot (e.g. aircraft hangar)
2. Select vehicle with passenger/freight capacity
3. Click on Change Prices and Details buttons

Expected results

The Change Prices and Details daughter windows open

Actual results

1. The daughter windows do not open.
2. The text entry focus jumps between the convoy name and the line name.

Notes

Start works correctly. Schedule seems to work if you click it on the left side. Copy convoy sometimes works and sometimes doesn't (might depend exactly where you click?). Refund doesn't work. So I guess that somehow the 'imagemap' (that's the HTML word, I don't the SDL word, but the system that maps mouse clicks to events) is offset.

The buttons work OK once the convoys leave the depot. So the issue appears to be specific to the Depot Window.
Title: Re: [BUG] Daughter windows cannot be opened from Depot Window
Post by: RESTRICTED ACCOUNT on May 25, 2022, 08:31:23 AM
Thank you for your report. I have checked the behavior and there is indeed a problem with the buttons in the depot dialog. But please note that your observatioon is strictly speaking mostly innacurate. (So that those who can solve the bug do not track this issue incorrectly.)
While all buttons are operable, very poor response seems to be the essence of this problem.
If you do the action of pressing and holding for about 0.5 seconds and then releasing, everything will work. (But I don't think it is correct that we have to do it that way. This is obviously a bug.)

I think this is related to recent changes in standard finger and mouse controls. (Possibly it was r10626 that introduced this?)
Also, this does not seem to happen with click actions or arrow buttons, only with regular round_buttons.
And this seems to happen only for some older dialogs not only for depot dialog.
For example, the schedule edit dialog, which is not gui_aligned_containerized as well, suffers from this symptom. On the other hand, for some reason, the Player and Schedule List dialogs, which are not gui_aligned_containerized, do not have this symptom.
These dialogs have already been updated to the new auto-align container in standard. Therefore, even if this bug is latent in the standard code, it may not be possible to reproduce a similar bug in the standard.

EDIT:
This appears to be a broken focus in old type dialogs. This means that for some reason, certain buttons require a long press or two clicks to take focus away from that button.

EDIT2:
(1) Old type GUI
(2) There is a combobox in the same GUI
It seems to be caused by these two. So older GUIs without combobox don't have this problem.
Clicking on an irrelevant location will cause the combo box to take focus.
Title: (r10642) BUG: Combobox interferes with other buttons getting focus
Post by: RESTRICTED ACCOUNT on May 25, 2022, 09:21:09 AM
Well, I can see this bug in the standard(r10642) as well.

Reproduction procedure with standard
(1) Opens the minimap dialog.
(2) Press the show networks button to open the comboboxes.
(3) Click the combobox and "Free capacity" button alternately.

The Free capacity button does not respond as expected by the player as it requires two clicks to take focus.

EDIT:
My guess is that r10564-10566 are related.
Title: PR#543 - FIX: Destruction of GUI behavior by combobox brought about by r10564
Post by: RESTRICTED ACCOUNT on May 26, 2022, 03:44:41 PM
This has had a serious impact on the schedule deletion operations in extended at present. I apologize for any inconvenience caused.
I think I have fixed this bug, check PR#543, I think standard can fix it as well.
Title: Re: [BUG] Daughter windows cannot be opened from Depot Window
Post by: jamespetts on May 26, 2022, 10:52:17 PM
Quote from: Ranran on May 26, 2022, 03:44:41 PMThis has had a serious impact on the schedule deletion operations in extended at present. I apologize for any inconvenience caused.
I think I have fixed this bug, check PR#543, I think standard can fix it as well.
Thank you for that - fix now incorporated.
Title: Re: [BUG] Daughter windows cannot be opened from Depot Window
Post by: Matthew on September 11, 2022, 11:06:49 AM
This has been fixed in Extended with Ranran's excellent new convoy assembly UI.