The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: THLeaderH on June 23, 2019, 10:54:34 AM

Title: The position of buttons are not appropriate in private gate sign window
Post by: THLeaderH on June 23, 2019, 10:54:34 AM
In r8773, the buttons in the private gate sign window is not correctly positioned like the image below.

(https://simutrans-germany.com/files/upload/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88_2019-06-23_19.45.17.png)

This phenomenon occurs only when the window is opened for the first time. If I opened the window twice or more, the position of the buttons are correct like this.

(https://simutrans-germany.com/files/upload/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88_2019-06-23_19.45.29.png)
Title: Re: The position of buttons are not appropriate in private gate sign window
Post by: danivenk on June 27, 2019, 03:25:34 PM
I have the same problem, after some tests I could conclude that even in maps made and run in r8756 have this problem....
Title: Re: The position of buttons are not appropriate in private gate sign window
Post by: danivenk on June 28, 2019, 04:19:43 PM
Today I tried some more, the bug doesn't happen in the simutrans 120.4.1 (r8600) version. But it does happen in the oldest nightly version I could find (r8750)

https://www.dropbox.com/s/rrsqo3yjemhuhkp/simscr23.png?dl=0
https://www.dropbox.com/s/l4bm4tfjgbv0s8o/simscr22.png?dl=0
Title: Re: The position of buttons are not appropriate in private gate sign window
Post by: shingoushori on June 29, 2019, 10:58:21 AM
fill_buffer() on obj_infowin_t::obj_infowin_t(const obj_t* obj)  seems to be obstacle, at least about private gate sign window.
so 2 plans for repairing are, I've made.

plan_minimum.diff : This is minimal. Only effective with privatesign_info_t. It is very ad hoc.
It have left the possibility of the same problem occurring elsewhere.

plan_objinfowin.diff : It is simple. However, the possibility of occurring elsewhere has been resolved.
To be worried about, It affects _info_t which has no tab. Only for a moment, the display size is small.

but There may be more essential solutions ...
Title: Re: The position of buttons are not appropriate in private gate sign window
Post by: Dwachs on June 29, 2019, 12:55:20 PM
Thanks for the report, it should be fixed in r8776.

@shingoushori: thanks for the patches, but the problem was more fundamental: in simwin.cc:730 a resize-event is sent to the window, the old base-info::infowin_event method set the view-element to visible, then the size calculations treated the view element as if it were positioned below the text-area. Hence the gap. I fixed this by introducing a new helper class that takes care of the combination of text-area and view element.
Title: Re: The position of buttons are not appropriate in private gate sign window
Post by: danivenk on June 29, 2019, 06:44:05 PM
When do you think r8776 will come out?
Title: Re: The position of buttons are not appropriate in private gate sign window
Post by: THLeaderH on June 29, 2019, 10:55:39 PM
Dwachs, thank you. I confirmed that the problem was solved  ;D