From 66fb5f87fb903248d60a2c29f3f7a79c75edd9b9 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 9 Sep 2011 18:40:19 -0700 Subject: [PATCH] don't exit trade mode if no tiles selected; fix warning string to match. --- xwords4/android/XWords4/res/values/strings.xml | 4 ++-- xwords4/common/board.c | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 63f3f63d4..f66e7bc0f 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -135,8 +135,8 @@ New pieces must contact others already in place (or the middle square on the first move) You can\'t do that; it\'s not your turn! No peeking at the robot\'s tiles! - Trade cancelled because no tiles - selected. (It\'s still your turn.) + Please tap to select tiles to be + exchanged. Too few tiles left to exchange. Tile assignment can\'t be undone. The hint feature is disabled for this game. Enable it for a new game using the Settings dialog. diff --git a/xwords4/common/board.c b/xwords4/common/board.c index b7ca0df41..f79dfb960 100644 --- a/xwords4/common/board.c +++ b/xwords4/common/board.c @@ -763,13 +763,15 @@ board_commitTurn( BoardCtxt* board ) after */ /* server_commitTrade() changes selPlayer, so board_endTrade must be called first() */ - (void)board_endTrade( board ); if ( NO_TILES == traySelBits ) { util_userError( board->util, ERR_NO_EMPTY_TRADE ); - } else if ( util_userQuery( board->util, QUERY_COMMIT_TRADE, - (XWStreamCtxt*)NULL ) ) { - (void)server_commitTrade( board->server, traySelBits ); + } else { + (void)board_endTrade( board ); + if ( util_userQuery( board->util, QUERY_COMMIT_TRADE, + (XWStreamCtxt*)NULL ) ) { + (void)server_commitTrade( board->server, traySelBits ); + } } } else { XP_Bool warn, legal;