mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +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;
|
TileBit traySelBits = pti->traySelBits;
|
||||||
result = XP_TRUE; /* there's at least the window to clean up
|
result = XP_TRUE; /* there's at least the window to clean up
|
||||||
after */
|
after */
|
||||||
/* server_commitTrade() changes selPlayer, so board_endTrade
|
|
||||||
must be called first() */
|
|
||||||
|
|
||||||
if ( NO_TILES == traySelBits ) {
|
if ( NO_TILES == traySelBits ) {
|
||||||
util_userError( board->util, ERR_NO_EMPTY_TRADE );
|
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 );
|
(void)board_endTrade( board );
|
||||||
if ( util_userQuery( board->util, QUERY_COMMIT_TRADE,
|
(void)server_commitTrade( board->server, traySelBits );
|
||||||
(XWStreamCtxt*)NULL ) ) {
|
|
||||||
(void)server_commitTrade( board->server, traySelBits );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
XP_Bool warn, legal;
|
XP_Bool warn, legal;
|
||||||
|
|
Loading…
Reference in a new issue