1
0
Fork 0

src/GUI/new_gui.cxx: NewGUI::setStyle(): remove old nodes before copying across new style.

Previously old nodes that weren't in the new style, would be left in place,
leading to a confusing mix of styles sometimes.
This commit is contained in:
Julian Smith 2019-08-16 21:36:32 +01:00
parent f3d1135320
commit 10414fada4

View file

@ -433,6 +433,9 @@ NewGUI::setStyle (void)
SGPropertyNode *selected_style = globals->get_props()->getNode("sim/gui/selected-style", true);
// n->copy() doesn't delete existing nodes, so need to clear them all
// first.
selected_style->removeAllChildren();
n->copy(selected_style);
//if (selected_style && n)