From 821af95e0d8d5afdfb7123417c1cfc905a4f41fb Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Sat, 21 Jun 2014 14:51:34 +0200 Subject: [PATCH] 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. --- src/GUI/FGPUIMenuBar.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.5