mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
fix so board draws correctly when loaded in trade mode
This commit is contained in:
parent
82a82b5ae1
commit
7457ce9b80
3 changed files with 6 additions and 4 deletions
|
@ -767,7 +767,7 @@ public class BoardActivity extends XWActivity
|
|||
item.setTitle( R.string.board_menu_game_final );
|
||||
}
|
||||
|
||||
if ( DeviceRole.SERVER_STANDALONE == m_gi.serverRole ) {
|
||||
if ( null != m_gi && DeviceRole.SERVER_STANDALONE == m_gi.serverRole ) {
|
||||
Utils.setItemVisible( menu, R.id.board_menu_game_resend, false );
|
||||
Utils.setItemVisible( menu, R.id.gamel_menu_checkmoves, false );
|
||||
}
|
||||
|
@ -1803,8 +1803,8 @@ public class BoardActivity extends XWActivity
|
|||
updateToolbar();
|
||||
if ( m_inTrade != m_gsi.inTrade ) {
|
||||
m_inTrade = m_gsi.inTrade;
|
||||
m_view.setInTrade( m_inTrade );
|
||||
}
|
||||
m_view.setInTrade( m_inTrade );
|
||||
adjustTradeVisibility();
|
||||
Activity self = BoardActivity.this;
|
||||
Utils.invalidateOptionsMenuIf( self );
|
||||
|
|
|
@ -178,7 +178,10 @@ public class BoardCanvas extends Canvas implements DrawCtx {
|
|||
|
||||
public void setInTrade( boolean inTrade )
|
||||
{
|
||||
m_inTrade = inTrade;
|
||||
if ( m_inTrade != inTrade ) {
|
||||
m_inTrade = inTrade;
|
||||
m_jniThread.handle( JNIThread.JNICmd.CMD_INVALALL );
|
||||
}
|
||||
}
|
||||
|
||||
// DrawCtxt interface implementation
|
||||
|
|
|
@ -321,7 +321,6 @@ public class BoardView extends View implements BoardHandler, SyncedDraw {
|
|||
if ( null != m_canvas ) {
|
||||
m_canvas.setInTrade( inTrade );
|
||||
}
|
||||
m_jniThread.handle( JNIThread.JNICmd.CMD_INVALALL );
|
||||
}
|
||||
|
||||
public int getCurPlayer()
|
||||
|
|
Loading…
Reference in a new issue