mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
fix confirm-changes-that-lose-turns logic so doesn't require
confirmation if no moves yet made.
This commit is contained in:
parent
1deda80a9c
commit
bf0f217460
1 changed files with 6 additions and 7 deletions
|
@ -532,19 +532,18 @@ public class GameConfig extends Activity implements View.OnClickListener {
|
|||
boolean consumed = false;
|
||||
if ( keyCode == KeyEvent.KEYCODE_BACK ) {
|
||||
saveChanges();
|
||||
if ( 0 <= m_nMoves && (m_giOrig.changesMatter(m_gi)
|
||||
|| m_carOrig.changesMatter(m_car) ) ) {
|
||||
if ( 0 <= m_nMoves ) { // no confirm needed
|
||||
applyChanges( true );
|
||||
} else if ( m_giOrig.changesMatter(m_gi)
|
||||
|| m_carOrig.changesMatter(m_car) ) {
|
||||
showDialog( CONFIRM_CHANGE );
|
||||
consumed = true;
|
||||
consumed = true; // don't dismiss activity yet!
|
||||
} else {
|
||||
applyChanges( false );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !consumed ) {
|
||||
consumed = super.onKeyDown( keyCode, event );
|
||||
}
|
||||
return consumed;
|
||||
return consumed || super.onKeyDown( keyCode, event );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue