fix property_browser()
This commit is contained in:
parent
d9ff131805
commit
aad61698ff
1 changed files with 4 additions and 7 deletions
|
@ -196,24 +196,21 @@ Dialog = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Open property browser with given target path.
|
# Open property browser with given target path.
|
||||||
#
|
#
|
||||||
property_browser = func(dir = "/") {
|
property_browser = func(dir = "/") {
|
||||||
var dlgname = "property-browser";
|
var dlgname = "property-browser";
|
||||||
var need_create = 1;
|
|
||||||
foreach (var module; keys(globals)) {
|
foreach (var module; keys(globals)) {
|
||||||
if (find("__dlg:" ~ dlgname, module) == 0) {
|
if (find("__dlg:" ~ dlgname, module) == 0) {
|
||||||
globals[module].clone(dir);
|
globals[module].clone(dir);
|
||||||
need_create = 0;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(need_create) {
|
|
||||||
setprop("/sim/gui/dialogs/" ~ dlgname ~ "/last", dir);
|
setprop("/sim/gui/dialogs/" ~ dlgname ~ "/last", dir);
|
||||||
fgcommand("dialog-show", props.Node.new({"dialog-name": dlgname}));
|
fgcommand("dialog-show", props.Node.new({"dialog-name": dlgname}));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
Loading…
Add table
Reference in a new issue