mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
disable delete if selected game is currently open
This commit is contained in:
parent
1be2d514f0
commit
472a173297
1 changed files with 7 additions and 3 deletions
|
@ -1382,9 +1382,13 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
Utils.setItemVisible( menu, R.id.games_menu_newgame_net,
|
||||
nothingSelected || 1 == nGroupsSelected );
|
||||
|
||||
// Multiples can be deleted
|
||||
Utils.setItemVisible( menu, R.id.games_game_delete,
|
||||
0 < nGamesSelected );
|
||||
// Multiples can be deleted, but disable if any selected game is
|
||||
// currently open
|
||||
enable = 0 < nGamesSelected;
|
||||
for ( long row : m_selGames ) {
|
||||
enable = enable && !m_launchedGames.contains( row );
|
||||
}
|
||||
Utils.setItemVisible( menu, R.id.games_game_delete, enable );
|
||||
|
||||
// multiple games can be regrouped/reset.
|
||||
Utils.setItemVisible( menu, R.id.games_game_move,
|
||||
|
|
Loading…
Reference in a new issue