mage icon indicating copy to clipboard operation
mage copied to clipboard

Remove windowDialogs for empty zones after rollback

Open Ebola16 opened this issue 1 year ago • 3 comments

Fixes #6856 #8686

Additionally, empty graveyard, sideboard, and exile windowDialogs will automatically close on updateGame

Test by experimenting with various combinations of graveyard, sideboard, and exile windowDialogs after performing rollbacks.

Ebola16 avatar Jan 27 '24 08:01 Ebola16

BTW wrong exile zones after rollback smells bad, there are possible problems with miss/wrong code in reset/copy methods (e.g. it use ref instead deep copy). I’ll look at it.

Windows clean up code from that PR can be useful too anyway.

JayDi85 avatar Jan 27 '24 09:01 JayDi85

With exileZone.isEmpty() conditional breakpoint set on !exileZone.isEmpty(): An empty exiles.add is triggered whenever a new GameView is called. Although I am not super familiar with this code, this seems reasonable and the check I added seems like a reasonable solution.

Ebola16 avatar Jan 27 '24 15:01 Ebola16

Fyi, adding missing exile windows after a rollback is handled by code unrelated to this PR earlier in updateGame.

Ebola16 avatar Feb 08 '24 19:02 Ebola16

As a player, I would prefer they remained open, just had their contents correctly cleared. (For example, when I have something that cares about the opponents graveyard, I will open their graveyard, resize it, and position it where I want on the screen (whether or not the graveyard happens to be empty at that point in time)).

I would rather not have to go through that process again after a rollback.

tiera3 avatar Mar 05 '24 11:03 tiera3

Agree that empty graveyard should not be closed. But empty specific exile zones should be.

Potential enhancement for future: allow to "pin" windows to prevent closing when empty

xenohedron avatar Mar 05 '24 14:03 xenohedron