allow to open several property browsers with one command line argument
(comma separated paths): --prop:browser=position,orientation,sim/model
This commit is contained in:
parent
52ed2de4c3
commit
0183e43b38
1 changed files with 10 additions and 7 deletions
|
@ -314,8 +314,10 @@ var FileSelector = {
|
|||
##
|
||||
# Open property browser with given target path.
|
||||
#
|
||||
var property_browser = func(dir = "/") {
|
||||
if (isa(dir, props.Node))
|
||||
var property_browser = func(dir = nil) {
|
||||
if (dir == nil)
|
||||
dir = "/";
|
||||
elsif (isa(dir, props.Node))
|
||||
dir = dir.getPath();
|
||||
var dlgname = "property-browser";
|
||||
foreach (var module; keys(globals)) {
|
||||
|
@ -334,11 +336,12 @@ var property_browser = func(dir = "/") {
|
|||
# the target path. On the command line use --prop:browser=orientation
|
||||
#
|
||||
settimer(func {
|
||||
foreach (var b; props.globals.getChildren("browser")) {
|
||||
var path = b.getValue();
|
||||
if (path != nil and size(path))
|
||||
property_browser(path);
|
||||
}
|
||||
foreach (var b; props.globals.getChildren("browser"))
|
||||
if ((var browser = b.getValue()) != nil)
|
||||
foreach (var path; split(",", browser))
|
||||
if (size(path))
|
||||
property_browser(string.trim(path));
|
||||
|
||||
props.globals.removeChildren("browser");
|
||||
}, 0);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue