freeciv21 icon indicating copy to clipboard operation
freeciv21 copied to clipboard

Closing the "Messages options" view opens the "Cities" view every time (or a random different one sometimes)

Open daavko opened this issue 2 years ago • 5 comments

Describe the bug If you open the Messages options view via "Game > Messages" and click the "Cancel" button there, you get to the "Cities" view (or sometimes a different one).

To Reproduce Steps to reproduce the behavior:

  1. Open the Messages options via "Game > Messages"
  2. Click the "Cancel" button on the bottom
  3. Observe you're in the "Cities" view now

Expected behavior It should put you wherever you were before, or to the map view.

Platform and version (please complete the following information):

  • OS: Windows 10
  • Freeciv21 version: beta 2
  • Ruleset/Longturn game (if applicable): not applicable

Additional context If you open the Messages options when in a different view, you get to a seemingly different view every time, doesn't look like there's a pattern to it.

daavko avatar Jul 07 '22 19:07 daavko

Can't repro

lmoureaux avatar Jul 12 '22 23:07 lmoureaux

Looks like it only appears after you open and close the shortcuts settings

daavko avatar Jul 13 '22 10:07 daavko

I'll create a video, it'll be easier

daavko avatar Jul 13 '22 10:07 daavko

Actually, it's even simpler. New, more accurate reproduction steps:

  1. Start a new game
  2. Switch to "cities" view
  3. Switch back to "map" view
  4. Open messages settings in Game > Messages
  5. Close messages settings by clicking "Cancel" on the bottom left
  6. Observe you're on "cities" view, even though you should be on "map" view

It appears to remember the second-to-last view you opened, instead of the last one. It works the same regardless of which view you open

daavko avatar Jul 13 '22 10:07 daavko

Reproduced. The way this widget is opened is a mess (as you'd expect from old code).

lmoureaux avatar Aug 15 '22 02:08 lmoureaux