]> git.mxchange.org Git - flightgear.git/commitdiff
Keep (PUI) menubar visibility on gui-redraw. (Fix #1251)
authorThomas Geymayer <tomgey@gmail.com>
Sat, 21 Jun 2014 12:51:34 +0000 (14:51 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Sat, 21 Jun 2014 12:51:34 +0000 (14:51 +0200)
For aircraft using fgcommand("gui-redraw"), which is for example
also used by gui.menuBind, the menubar was always hidden and
not shown again.

src/GUI/FGPUIMenuBar.cxx

index b610caf01a67d08d6fc9c177996132117525d716..9f52836855c0e697582fca5dd362856c01221149 100644 (file)
@@ -95,12 +95,17 @@ FGPUIMenuBar::~FGPUIMenuBar ()
 void
 FGPUIMenuBar::init ()
 {
+    bool visible = _visible;
     destroy_menubar();
-  
+
     make_menubar();
                                 // FIXME: temporary commands to get at
                                 // old, hard-coded dialogs.
     add_deprecated_dialogs();
+
+    // Keep menu visible during gui-redraw
+    if( visible )
+      show();
 }
 
 void