From: James Turner Date: Tue, 25 Jun 2013 20:28:56 +0000 (+0100) Subject: Bug 947, menu item state wrong after reset. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=45ea8b5daadb1ca5d24cf3c5fff3b4e0905b5ba3;p=flightgear.git Bug 947, menu item state wrong after reset. Mark the entire /sim/menubar tree as PRESERVED, so reset doesn't mess up all the state. --- diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index 28e463bc6..8ca5c12c5 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -76,6 +76,9 @@ NewGUI::init () readDir(p); const std::string aircraft_dir(fgGetString("/sim/aircraft-dir")); readDir( SGPath(aircraft_dir, "gui/dialogs") ); + + // Fix for http://code.google.com/p/flightgear-bugs/issues/detail?id=947 + fgGetNode("sim/menubar")->setAttribute(SGPropertyNode::PRESERVE, true); _menubar->init(); } diff --git a/src/MultiPlayer/multiplaymgr.cxx b/src/MultiPlayer/multiplaymgr.cxx index 62ca039de..d58d2b900 100644 --- a/src/MultiPlayer/multiplaymgr.cxx +++ b/src/MultiPlayer/multiplaymgr.cxx @@ -428,6 +428,8 @@ FGMultiplayMgr::init (void) mTimeUntilSend = 0.0; mCallsign = fgGetString("/sim/multiplay/callsign"); + fgGetNode("/sim/multiplay/callsign", true)->setAttribute(SGPropertyNode::PRESERVE, true); + if ((!txAddress.empty()) && (txAddress!="0")) { mServer.set(txAddress.c_str(), txPort); if (strncmp (mServer.getHost(), "0.0.0.0", 8) == 0) {