1
0
Fork 0

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:
mfranz 2007-11-28 22:22:29 +00:00
parent 52ed2de4c3
commit 0183e43b38

View file

@ -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);