mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
for deletes, don't clear selection until after it's confirmed and
finished.
This commit is contained in:
parent
e6860a734c
commit
0a5e891d5e
2 changed files with 9 additions and 2 deletions
|
@ -400,8 +400,10 @@ public class GameListAdapter implements ExpandableListAdapter {
|
|||
for ( Iterator<Long>iter = groupids.iterator();
|
||||
iter.hasNext(); ) {
|
||||
int pos = getGroupPosition( iter.next() );
|
||||
GameListGroup group = getGroupItemFor( pos );
|
||||
group.setSelected( false );
|
||||
if ( 0 <= pos ) { // still exists?
|
||||
GameListGroup group = getGroupItemFor( pos );
|
||||
group.setSelected( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -605,6 +605,7 @@ public class GamesList extends XWExpandableListActivity
|
|||
for ( long groupID : groupIDs ) {
|
||||
GameUtils.deleteGroup( this, groupID );
|
||||
}
|
||||
clearSelections();
|
||||
onContentChanged();
|
||||
break;
|
||||
case DELETE_GAMES:
|
||||
|
@ -752,6 +753,7 @@ public class GamesList extends XWExpandableListActivity
|
|||
break;
|
||||
|
||||
case R.id.gamel_menu_delete:
|
||||
keepSels = true;
|
||||
String msg = Utils.format( this, R.string.confirm_seldeletesf,
|
||||
selRowIDs.length );
|
||||
showConfirmThen( msg, R.string.button_delete,
|
||||
|
@ -831,6 +833,7 @@ public class GamesList extends XWExpandableListActivity
|
|||
|
||||
// Group menus
|
||||
case R.id.list_group_delete:
|
||||
keepSels = true;
|
||||
if ( m_selGroupIDs
|
||||
.contains( XWPrefs.getDefaultNewGameGroup( this ) ) ) {
|
||||
showOKOnlyDialog( R.string.cannot_delete_default_group );
|
||||
|
@ -854,6 +857,7 @@ public class GamesList extends XWExpandableListActivity
|
|||
break;
|
||||
case R.id.list_group_default:
|
||||
XWPrefs.setDefaultNewGameGroup( this, groupID );
|
||||
keepSels = true;
|
||||
break;
|
||||
case R.id.list_group_rename:
|
||||
m_groupid = groupID;
|
||||
|
@ -1155,6 +1159,7 @@ public class GamesList extends XWExpandableListActivity
|
|||
}
|
||||
|
||||
NetUtils.informOfDeaths( this );
|
||||
clearSelections();
|
||||
}
|
||||
|
||||
private boolean makeNewNetGameIf()
|
||||
|
|
Loading…
Reference in a new issue