From: Thomas Geymayer Date: Sat, 21 Jun 2014 12:51:34 +0000 (+0200) Subject: Keep (PUI) menubar visibility on gui-redraw. (Fix #1251) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=821af95e0d8d5afdfb7123417c1cfc905a4f41fb;p=flightgear.git Keep (PUI) menubar visibility on gui-redraw. (Fix #1251) For aircraft using fgcommand("gui-redraw"), which is for example also used by gui.menuBind, the menubar was always hidden and not shown again. --- diff --git a/src/GUI/FGPUIMenuBar.cxx b/src/GUI/FGPUIMenuBar.cxx index b610caf01..9f5283685 100644 --- a/src/GUI/FGPUIMenuBar.cxx +++ b/src/GUI/FGPUIMenuBar.cxx @@ -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