mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
Fix bug where arrow gets placed in wrong cell when tapping on tentative tiles to remove them while board is flipped.
This commit is contained in:
parent
f832959480
commit
aa3d3bc76c
1 changed files with 5 additions and 4 deletions
|
@ -2486,9 +2486,10 @@ tryReplaceTile( BoardCtxt* board, XP_U16 pencol, XP_U16 penrow )
|
||||||
XP_U16 col, row;
|
XP_U16 col, row;
|
||||||
Tile tile;
|
Tile tile;
|
||||||
XP_Bool ignore, isPending;
|
XP_Bool ignore, isPending;
|
||||||
|
XP_U16 modcol, modrow;
|
||||||
|
|
||||||
flipIf( board, pencol, penrow, &pencol, &penrow );
|
flipIf( board, pencol, penrow, &modcol, &modrow );
|
||||||
if ( model_getTile( board->model, pencol, penrow, XP_TRUE,
|
if ( model_getTile( board->model, modcol, modrow, XP_TRUE,
|
||||||
board->selPlayer, &tile, &ignore, &isPending,
|
board->selPlayer, &tile, &ignore, &isPending,
|
||||||
(XP_Bool*)NULL )
|
(XP_Bool*)NULL )
|
||||||
&& isPending ) {
|
&& isPending ) {
|
||||||
|
@ -2499,12 +2500,12 @@ tryReplaceTile( BoardCtxt* board, XP_U16 pencol, XP_U16 penrow )
|
||||||
index = count;
|
index = count;
|
||||||
model_getCurrentMoveTile( board->model, board->selPlayer,
|
model_getCurrentMoveTile( board->model, board->selPlayer,
|
||||||
&index, &tile, &col, &row, &ignore );
|
&index, &tile, &col, &row, &ignore );
|
||||||
if ( col == pencol && row == penrow ) {
|
if ( col == modcol && row == modrow ) {
|
||||||
model_moveBoardToTray( board->model, board->selPlayer,
|
model_moveBoardToTray( board->model, board->selPlayer,
|
||||||
index );
|
index );
|
||||||
/* the cursor should show up where the tile used to be so it's
|
/* the cursor should show up where the tile used to be so it's
|
||||||
easy to replace it. */
|
easy to replace it. */
|
||||||
setArrow( board, col, row );
|
setArrow( board, pencol, penrow );
|
||||||
result = XP_TRUE;
|
result = XP_TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue