The International Simutrans Forum

Development => Bug Reports => Topic started by: captain crunch on February 04, 2017, 06:27:05 PM

Title: [r8063] Haltlist window buttons open Halt window
Post by: captain crunch on February 04, 2017, 06:27:05 PM
Pressing on any of four the halt list window buttons opens the first halt's information window when there are halts in the game. If there are no halts the buttons seem to work as intended.
Setting a break point in gdb for halt_list_frame_t::action_triggered fires when there are no halts built yet. It does not fire after halts are added to the game.
Build OS and architecture is Linux/GNU amd64 with clang 3.5.0 and libSDL 1.2.
Title: Re: [r8063] Haltlist window buttons open Halt window
Post by: DrSuperGood on February 05, 2017, 01:36:23 AM
List alignment error. The stop list is overlaying the buttons. The buttons work if pressed at the top, but if pressed at the bottom it is triggering the top of the list instead of the buttons.

I am looking into a fix now.
Title: Re: [r8063] Haltlist window buttons open Halt window
Post by: prissi on February 05, 2017, 02:17:38 AM
Actually, that window also needs migration into the standard list window. It was using constant offsets, which is a no go with themes. So I applied a hotfix first.
Title: Re: [r8063] Haltlist window buttons open Halt window
Post by: DrSuperGood on February 05, 2017, 03:18:36 AM
QuoteActually, that window also needs migration into the standard list window.
I assume you mean like the factory list works? In any case this bug is why one should not use hard-coded magic position numbers and instead use relative positions.
Title: Re: [r8063] Haltlist window buttons open Halt window
Post by: prissi on February 05, 2017, 05:09:52 AM
Yes, and in most places we painfully converted this a long time ago. But that offset was overlooked.