show loadDB menuitem only when nothing's selected

This commit is contained in:
Eric House 2014-03-05 06:37:02 -08:00
parent 45ace48490
commit 923ac6db98

View file

@ -672,7 +672,8 @@ public class GamesList extends XWExpandableListActivity
|| XWPrefs.getDebugEnabled( this ); || XWPrefs.getDebugEnabled( this );
showItemsIf( DEBUG_ITEMS, menu, nothingSelected && showDbg ); showItemsIf( DEBUG_ITEMS, menu, nothingSelected && showDbg );
Utils.setItemVisible( menu, R.id.games_menu_loaddb, Utils.setItemVisible( menu, R.id.games_menu_loaddb,
showDbg && DBUtils.gameDBExists( this ) ); showDbg && nothingSelected &&
DBUtils.gameDBExists( this ) );
showItemsIf( NOSEL_ITEMS, menu, nothingSelected ); showItemsIf( NOSEL_ITEMS, menu, nothingSelected );
showItemsIf( ONEGAME_ITEMS, menu, 1 == nGamesSelected ); showItemsIf( ONEGAME_ITEMS, menu, 1 == nGamesSelected );