The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended bug reports => Topic started by: Ranran on July 17, 2022, 05:58:15 AM

Title: [r10684] The lines of the combobox collapse and overlap in one line
Post by: Ranran on July 17, 2022, 05:58:15 AM
I'm posting this as a new thread because I found a clear way to reproduce a different bug than the subject of that thread implied here (https://forum.simutrans.com/index.php/topic,21740.0.html).

Reproduction procedure:

1. Open the depot dialog
2. Input characters to the search text input
3. Immediately click on the sort combobox below

(https://i.imgur.com/afn23PR.png)
Title: Re: [r10684] The lines of the combobox collapse and overlap in one line
Post by: rafson on July 24, 2022, 08:43:00 PM
Hi, this is my first post in this forum. I decided I'd like to try contributing to Simutrans and wanted to start from a low-hanging fruit like this simple bug report. I debugged this a bit and found a one-line fix for the issue. The problem is that the list is repopulated in this case, but the position of the items is not recalculated so they all show up at (0,0) with respect to the box. It is fixed by adding one line as in the attached diff file.

It's not clear to me if submitting the diff here in the bug report is enough to get it added to the repository, or whether I should submit it separately in the Patches & Projects board.

fix_depot_combobox.diff
Title: Re: [r10684] The lines of the combobox collapse and overlap in one line
Post by: Yona-TYT on July 25, 2022, 12:18:24 AM
Quote from: rafson on July 24, 2022, 08:43:00 PMHi, this is my first post in this forum. I decided I'd like to try contributing to Simutrans and wanted to start from a low-hanging fruit like this simple bug report. I debugged this a bit and found a one-line fix for the issue. The problem is that the list is repopulated in this case, but the position of the items is not recalculated so they all show up at (0,0) with respect to the box. It is fixed by adding one line as in the attached diff file.
It's not clear to me if submitting the diff here in the bug report is enough to get it added to the repository, or whether I should submit it separately in the Patches & Projects board.
fix_depot_combobox.diff
@Prissi said she's on vacation, so if someone else commits this patch that would be great. 8)
Title: Re: [r10684] The lines of the combobox collapse and overlap in one line
Post by: Isaac Eiland-Hall on July 26, 2022, 07:42:59 PM
Quote from: Yona-TYT on July 25, 2022, 12:18:24 AMshe's

I... think I missed some important news! ;-)
Title: Re: [r10684] The lines of the combobox collapse and overlap in one line
Post by: Yona-TYT on July 26, 2022, 11:50:17 PM
Quote from: Isaac Eiland-Hall on July 26, 2022, 07:42:59 PMI... think I missed some important news! ;-)
:o :o :o :o
Title: Re: [r10684] The lines of the combobox collapse and overlap in one line
Post by: Roboron on July 27, 2022, 01:59:58 PM
Quote from: rafson on July 24, 2022, 08:43:00 PMHi, this is my first post in this forum. I decided I'd like to try contributing to Simutrans and wanted to start from a low-hanging fruit like this simple bug report.

Welcome to the Simutrans International Forum and to Simutrans development!


Quote from: rafson on July 24, 2022, 08:43:00 PMIt's not clear to me if submitting the diff here in the bug report is enough to get it added to the repository, or whether I should submit it separately in the Patches & Projects board.

Don't worry, it is enough. Maybe I would have looked into it more quickly if a new thread would have been opened in the Patches & Projects sub-forum, but not actually, because notifications e-mails are not working currently anyway.

Whatever, your patch seems to solve the bug so I submitted it in r10699. Thank you very much!
Title: Re: [r10684] The lines of the combobox collapse and overlap in one line
Post by: Matthew on July 27, 2022, 08:55:38 PM
Quote from: rafson on July 24, 2022, 08:43:00 PMHi, this is my first post in this forum. I decided I'd like to try contributing to Simutrans and wanted to start from a low-hanging fruit like this simple bug report.

Welcome to the forum and thank you for contributing! It is great to have more players participate in development.
Title: Re: [r10684] The lines of the combobox collapse and overlap in one line
Post by: Ranran on August 06, 2022, 12:49:55 PM
Quote from: Roboron on July 27, 2022, 01:59:58 PMWhatever, your patch seems to solve the bug so I submitted it in r10699. Thank you very much!
This bug can be reproduced in extended, but not solved in the same way.
The underlying causes that exist in the combobox may not have been resolved.

The difference between the extended and standard case is whether it is placed in a gui_frame_t or an gui_aligned_container_t.