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:
parent
f3d1135320
commit
10414fada4
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue