mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-13 08:01:33 +01:00
fix miniwindow getting erased as soon as drawn. Problem was that
board code invalidated crosshairs cells in timer callback after drawing miniwindow but board_draw isn't supposed to get called until after penup. But java miniwindow drawing code was pushing DRAW event to get the canvas updated. Instead I'm just invalidating the view which copies the canvas without calling board_draw().
This commit is contained in:
parent
6cb2638a50
commit
15f2a46279
1 changed files with 11 additions and 1 deletions
|
@ -687,7 +687,17 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
|||
}
|
||||
|
||||
m_canvas.drawRect( rect, m_strokePaint );
|
||||
m_jniThread.handle( JNIThread.JNICmd.CMD_DRAW );
|
||||
|
||||
// Unlike other draw methods, this one is usually called from
|
||||
// outside board_draw and so doesn't benefit from the canvas
|
||||
// getting moved to the board. Set that up manually. Sending
|
||||
// DRAW cmd as I used to do draws *everything* and may well
|
||||
// overwrite the miniwindow.
|
||||
m_viewHandler.post( new Runnable() {
|
||||
public void run() {
|
||||
BoardView.this.invalidate();
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
public void objFinished( /*BoardObjectType*/int typ, Rect rect, int dfs )
|
||||
|
|
Loading…
Reference in a new issue