mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
only exit exchange mode if user confirms trade
This commit is contained in:
parent
c9c498786e
commit
e709ea730c
1 changed files with 5 additions and 7 deletions
|
@ -761,17 +761,15 @@ board_commitTurn( BoardCtxt* board )
|
|||
TileBit traySelBits = pti->traySelBits;
|
||||
result = XP_TRUE; /* there's at least the window to clean up
|
||||
after */
|
||||
/* server_commitTrade() changes selPlayer, so board_endTrade
|
||||
must be called first() */
|
||||
|
||||
if ( NO_TILES == traySelBits ) {
|
||||
util_userError( board->util, ERR_NO_EMPTY_TRADE );
|
||||
} else {
|
||||
} else if ( util_userQuery( board->util, QUERY_COMMIT_TRADE,
|
||||
(XWStreamCtxt*)NULL ) ) {
|
||||
/* server_commitTrade() changes selPlayer, so board_endTrade
|
||||
must be called first() */
|
||||
(void)board_endTrade( board );
|
||||
if ( util_userQuery( board->util, QUERY_COMMIT_TRADE,
|
||||
(XWStreamCtxt*)NULL ) ) {
|
||||
(void)server_commitTrade( board->server, traySelBits );
|
||||
}
|
||||
(void)server_commitTrade( board->server, traySelBits );
|
||||
}
|
||||
} else {
|
||||
XP_Bool warn, legal;
|
||||
|
|
Loading…
Reference in a new issue