News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

[r10684] The lines of the combobox collapse and overlap in one line

Started by Ranran, July 17, 2022, 05:58:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran

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.

Reproduction procedure:

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


rafson

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

Yona-TYT

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)

Isaac Eiland-Hall



Roboron

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!

Matthew

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.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Ranran

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.