diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index e99c15f92..04b0d4473 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -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)