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:
Andy2 2010-07-13 18:47:29 -07:00
parent 6cb2638a50
commit 15f2a46279

View file

@ -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 )