From b7dd4fd50c50ab2d2528cec5fb3232c23c2ea3fd Mon Sep 17 00:00:00 2001 From: ehouse <ehouse@0782aaa5-4710-0410-8820-a96bf9123855> Date: Tue, 5 Oct 2004 02:32:58 +0000 Subject: [PATCH] bug: hide arrow when it can't be moved in case where tile comes via keyboard --- xwords4/common/board.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xwords4/common/board.c b/xwords4/common/board.c index 5e63b1988..bbf7620dc 100644 --- a/xwords4/common/board.c +++ b/xwords4/common/board.c @@ -1587,6 +1587,7 @@ drawCell( BoardCtxt* board, XP_U16 col, XP_U16 row, XP_Bool skipBlanks ) XP_SNPRINTF( ch, sizeof(ch), (XP_UCHAR*)"%d", val ); } else if ( dict_faceIsBitmap( dict, tile ) ) { bitmap = dict_getFaceBitmap( dict, tile, XP_FALSE ); + XP_ASSERT( !!bitmap ); textP = (XP_UCHAR*)NULL; } else { dict_tilesToString( dict, &tile, 1, ch ); @@ -2553,8 +2554,9 @@ board_handleKey( BoardCtxt* board, XP_Key key ) XP_ASSERT( key >= XP_KEY_LAST ); result = trayVisible && moveKeyTileToBoard( board, key ); - if ( result ) { - (void)advanceArrow( board ); + + if ( result && !advanceArrow( board ) ) { + setArrowVisible( board, XP_FALSE ); } } /* switch */