1
0
Fork 0

Copy currently selected gui style tree to sim/gui/selected-style

This makes it considerably easier to reference an item from the currently selected style without having to lookup the selected style index and then use that to select the appropriate element from the styles/ tree
This commit is contained in:
Richard Harrison 2017-10-15 21:49:40 +02:00
parent 02ceb8832a
commit 5af55a1409

View file

@ -414,6 +414,13 @@ NewGUI::setStyle (void)
if (!n) if (!n)
n = sim->getChild("style", 0, true); n = sim->getChild("style", 0, true);
SGPropertyNode *selected_style = globals->get_props()->getNode("sim/gui/selected-style", true);
n->copy(selected_style);
//if (selected_style && n)
// n->alias(selected_style);
setupFont(n->getNode("fonts/gui", true)); setupFont(n->getNode("fonts/gui", true));
n = n->getNode("colors", true); n = n->getNode("colors", true);