From ca4ad741517b6d975ed1d6e0df151560582d30d5 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 31 Mar 2012 21:29:46 +0200 Subject: [PATCH] more cleanup --- apps/openmw/mwgui/window_manager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwgui/window_manager.cpp b/apps/openmw/mwgui/window_manager.cpp index 1afca1d41a..49b6e644d3 100644 --- a/apps/openmw/mwgui/window_manager.cpp +++ b/apps/openmw/mwgui/window_manager.cpp @@ -180,7 +180,6 @@ void WindowManager::updateVisible() // Mouse is visible whenever we're not in game mode MyGUI::PointerManager::getInstance().setVisible(isGuiMode()); - int eff; switch(mode) { case GM_Game: // If in game mode, don't show anything. @@ -202,16 +201,18 @@ void WindowManager::updateVisible() mCharGen->spawnDialog(mode); break; case GM_Inventory: + { // First, compute the effective set of windows to show. // This is controlled both by what windows the // user has opened/closed (the 'shown' variable) and by what // windows we are allowed to show (the 'allowed' var.) - eff = shown & allowed; + int eff = shown & allowed; // Show the windows we want map -> setVisible( (eff & GW_Map) != 0 ); stats -> setVisible( (eff & GW_Stats) != 0 ); break; + } case GM_Dialogue: dialogueWindow->open(); break;