]> git.mxchange.org Git - flightgear.git/commitdiff
Keep track of the visible/hidden state more robustly.
authordavid <david>
Sat, 18 Jan 2003 21:11:15 +0000 (21:11 +0000)
committerdavid <david>
Sat, 18 Jan 2003 21:11:15 +0000 (21:11 +0000)
src/GUI/menubar.cxx

index a7c660a9f2d6e169bf555119b9fc58fd7e1779dd..38de42f5832daaa0560699ca1347b058ffaa8ed5 100644 (file)
@@ -323,23 +323,16 @@ FGMenuBar::init ()
 void
 FGMenuBar::show ()
 {
-    if (_menuBar != 0) {
+    if (_menuBar != 0)
         _menuBar->reveal();
-        _visible = true;
-    } else {
-        SG_LOG(SG_GENERAL, SG_ALERT, "No menu bar to show");
-        _visible = false;
-    }
+    _visible = true;
 }
 
 void
 FGMenuBar::hide ()
 {
-    if (_menuBar != 0) {
+    if (_menuBar != 0)
         _menuBar->hide();
-    } else {
-        SG_LOG(SG_GENERAL, SG_ALERT, "No menu bar to show");
-    }
     _visible = false;
 }
 
@@ -403,6 +396,10 @@ FGMenuBar::make_menubar ()
         make_menu(menu_nodes[i]);
 
     _menuBar->close();
+    if (_visible)
+        _menuBar->reveal();
+    else
+        _menuBar->hide();
 }
 
 // end of menubar.cxx