Opened 6 years ago

Last modified 6 years ago

#10441 new defect

GUI: Save/load dialog flickers when repeatedly clicking the list/grid buttons

Reported by: bonki Owned by:
Priority: normal Component: GUI
Version: Keywords:
Cc: Game:


Clicking the _listButton (or _gridButton) in the SaveLoadChooserDialog when already viewing the list view (or grid view) results in showing the main LauncherDialog for a split second resulting in ugly flickering.


  1. Make sure the buttons don't do anything when pressed repeatedly
  2. Actually disable the _listButton when showing the list view and the _gridButton when showing the grid view
  3. Replace both buttons with a single button which toggles between both views

My personal preference is (3) but that might not be desirable if we would like to be able to implement/provide more than two views in the future.

This might also be related to or be the same as #7132 which also means that there's probably an underlying problem with how we render different dialogs in the GUI which should be fixed before either (3) or (2) gets implemented, otherwise we're only masking the symptoms.

Change History (5)

comment:1 by macca8, 6 years ago

I have to admit that my immediate reaction to this report was "why would you want to click a button for a view that already exists?".
However, upon investigation, I've found that the issue is more extensive than you've reported.

Firstly, the same behaviour also exists when switching between grid and list views, regardless of the direction.
Secondly, the behaviour isn't restricted to the Launcher… it also occurs in-game (in which case, flashback is to the in-game menu, including the game screen).

However, another wrinkle exists in-game, depending on the graphics mode in use. On Mac OS X, OpenGL allows switching between views and displays this behaviour. On the other hand, graphics modes dependent on SDL only display in list view, and have the view buttons disabled, and thus avoid the issue.
Note that the issue occurs in the Launcher with both OpenGL & SDL.

Since switching views creates the same flashback as clicking the same view, and the objective here is to prevent an ugly flicker for an unnecessary action, I'd recommend your second option (to disable the appropriate view button).

comment:2 by bonki, 6 years ago

You're totally right, for some reason I didn't notice that this also occurs when switching between views (i.e. always).

However, since this is the case, I don't see how any of my proposed options would actually solve the problem because one button would always be active at any given time and clicking that button would trigger it.

Whatever the underlying problem may be, it needs fixing there.

Last edited 6 years ago by bonki (previous) (diff)

comment:3 by macca8, 6 years ago

Sorry, my reference to an unnecessary action was probably misleading.
I was referring to the act of clicking the button for the existing view, rather than just the flashback associated with it.

You're correct that your options won't solve the underlying problem, but your second option at least removes one instance of it, while also preventing a user action that serves no useful purpose, so it still has merit.

The underlying problem can still be dealt with separately.

comment:4 by bonki, 6 years ago

Ah. Yes, we should definitely disable the button for the current view as well on top of fixing the underlying problem.

comment:5 by digitall, 6 years ago

Have committed code to do the disabling of current view button as commit 9831f6ddd293202984d5d421f24d0078406ef9af.

The flickering is because upon switching the dialog view type, the dialog closes itself and reopens as the new type. This will always flicker the main launcher view as this is as expected.

I think the "correct" solution here to solve this would be to refactor the SaveLoadChooser to not close and reopen, but instead to delete the widgets and repopulate with the new widgets before triggering a reflow. That would then not "flash the launcher"...

Note: See TracTickets for help on using tickets.