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:
parent
02ceb8832a
commit
5af55a1409
1 changed files with 7 additions and 0 deletions
|
@ -413,6 +413,13 @@ NewGUI::setStyle (void)
|
|||
SGPropertyNode *n = sim->getChild("style", which);
|
||||
if (!n)
|
||||
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));
|
||||
n = n->getNode("colors", true);
|
||||
|
|
Loading…
Reference in a new issue