After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742762 - Closing the promotion dialog switches move to the other player without the current player moving
Closing the promotion dialog switches move to the other player without the cu...
Status: RESOLVED FIXED
Product: gnome-chess
Classification: Applications
Component: General
git master
Other All
: Normal major
: ---
Assigned To: gnome-chess-maint
gnome-chess-maint
Depends on:
Blocks:
 
 
Reported: 2015-01-11 15:57 UTC by Sahil Sareen
Modified: 2015-01-11 18:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Cancel move if promotion type selector is closed (2.48 KB, patch)
2015-01-11 17:35 UTC, Michael Catanzaro
none Details | Review
Prohibit deletion of promotion type dialog (1.91 KB, patch)
2015-01-11 17:37 UTC, Michael Catanzaro
none Details | Review

Description Sahil Sareen 2015-01-11 15:57:03 UTC
Steps to reproduce:
----------------------------
1. Start a new game.
2. Move (white)pawn to do a promotion.
3. Close the promotion dialog without choosing any piece for promotion.
4. Other player(black) gets to move and (white)pawn is still in old position.

We should either:
1. Disable closing the promotion dialog.
or
2. Assume that, because the player closed the promotion dialog, he wants to do a different move( not a promotion ) and allow him to do a different move.
[Basically don't switch players - Allow the current player to move]
Comment 1 Michael Catanzaro 2015-01-11 17:08:13 UTC
If the dialog is destroyed prematurely, it's supposed to move the pawn and promote to a Queen, which is what happens when I test this. But prohibiting deletion would be good indeed.
Comment 2 Michael Catanzaro 2015-01-11 17:28:06 UTC
Actually, I think I'd prefer deleting the dialog to just cancel the move. Doesn't much matter either way, but canceling the move would be easier.
Comment 3 Michael Catanzaro 2015-01-11 17:35:38 UTC
Created attachment 294288 [details] [review]
Cancel move if promotion type selector is closed
Comment 4 Michael Catanzaro 2015-01-11 17:37:05 UTC
Created attachment 294289 [details] [review]
Prohibit deletion of promotion type dialog

This is hacky, but I can't figure out how else to handle the Escape key. Probably allowing the user to cancel the dialog is better anyway.
Comment 5 Sahil Sareen 2015-01-11 18:26:09 UTC
I was inclined to solution 2 as well.
Pushed "Cancel move if promotion type selector is closed" to master.

Thanks :D