build list behavior when changing systems

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Post Reply
Message
Author
User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

build list behavior when changing systems

#1 Post by Dilvish »

If there is already a discussion on this, my searching couldn't find it.

Something that really bothers me as I'm working in the Production window, is how often I'll switch to some planet and the build list box will come up partially empty, only showing a portion of the items that are actually buildable at that location, and I'll have to scroll up in order to see the other items, which relies on me being focused enough to remember that there really should be some other items showing up there. (Yes, theoretically I could notice the scrollbar is in a middling position, but that never happens until after I realize the issue is occurring.) It is noticeably aggravating.

Of course, now that I'm trying to write a post on it, I can't seem to make it happen in a repeatable way, but it happens pretty often during a game. I am pretty sure it did not happen a year ago, but it has been happening for at least several months.

I could guess a few reasons that this might have come about either intentionally or inadvertently while addressing some related listbox issue, but I don't think it really needs to be, or should be, exactly like it is now. It's not just that it is making sure that a previously selected entry is visible, but it may be forcing a particular item to be on top.

Has this been bothering anyone else? Does anyone recall the motive that led to this particular behavior, and is there some particular aspect/result of this behavior that I should make sure to preserve if I tinker with changing it?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: build list behavior when changing systems

#2 Post by Vezzra »

Dilvish wrote:Has this been bothering anyone else?
Didn't have the time to play test games for a while now, but IIRC I ran into the problem last time I did and yes, it's annoying. Not terribly so, but still.

But I can't tell at all when and why this started to happen.

User avatar
Gargamel
Space Floater
Posts: 33
Joined: Tue Feb 22, 2011 4:54 am

Re: build list behavior when changing systems

#3 Post by Gargamel »

I noticed this too.

It seems after the last building has been selected, and then you switch systems, the list starts at the next item on the list. It might be that the index of the first item to display in the box is not getting refreshed when you switch systems.

LGM-Doyle
Programmer
Posts: 219
Joined: Mon Feb 29, 2016 8:37 pm

Re: build list behavior when changing systems

#4 Post by LGM-Doyle »

I was the last person to make a change to the positioning code in BuildDesignatorWnd, in commit d1b43f45d0f0.

The previous behavior when showing an updated queue was to jump to the first row of an item of the same type as the previous first item in the queue. There were only two item types, ships and buildings, so it was jumpy.

I was fixing #1147 where the production window queue and build designator windows were resetting their positions when an item was added/or removed from the queue or the designator.

I fixed that bug so that the queues keep the same relative position from the top/bottom of the queue.

You could alter the code so that it resets to the top of the list when it switches to a new planet. That might fix your aggravation. Right now it looks like the PopulateList code doesn't know when it is populating a new planet.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: build list behavior when changing systems

#5 Post by Dilvish »

LGM-Doyle wrote:I was fixing #1147...
Ah, thanks much for the explanation and suggestion, I'll see what I can do.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply