1
0
Fork 0

Fix property browser #0 not working on second open

Since we mutate the (cached) definition properties on each call to
clone(), we need to reset these values back, or the non-clone()-ed
instance gets confused paths to its input and list widgets.

https://sourceforge.net/p/flightgear/codetickets/2044/
This commit is contained in:
James Turner 2018-10-25 16:23:19 +01:00
parent 9a140983a7
commit cad41649dc

View file

@ -197,6 +197,19 @@
});
fgcommand("dialog-new", self);
fgcommand("dialog-show", self);
var originalPath = '/sim/gui/dialogs/property-browser';
# reset the values, so we don't use incorrect paths
# when the last browser is closed and then re-opened
# bug: https://sourceforge.net/p/flightgear/codetickets/2044/
self.setValues({
"name": "property-browser",
"dialog-name": "property-browser",
"group[0]/text/property": originalPath ~ "/title",
"property-list/property": originalPath ~ "/list",
"group[1]/text/property": originalPath ~ "/label",
"group[1]/input/property": originalPath ~ "/input",
});
}
var auto_update = func {