1
0
Fork 0

whoops ... /model is already reserved -> name it back to /cursor

This commit is contained in:
mfranz 2006-03-31 17:12:32 +00:00
parent cb2f06992f
commit cd39d50c16
2 changed files with 5 additions and 4 deletions

View file

@ -127,7 +127,7 @@
</input>
<!-- default model -->
<model>Aircraft/ufo/Models/cursor.ac</model>
<cursor>Aircraft/ufo/Models/cursor.ac</cursor>
<!-- subdirs of $FG_ROOT to search models in.
Comma separated, e.g. "Models,Scenery/Objects/w130n30" -->

View file

@ -119,7 +119,8 @@ search = func(list, which) {
}
# scan all objects in subdir of $FG_ROOT. (Prefer *.xml files to *.ac files.)
# scan all objects in subdir of $FG_ROOT. (Prefer *.xml files to *.ac files
# if both exist)
#
scan_models = func(base) {
var result = [];
@ -800,7 +801,7 @@ settimer(func {
modellist = scanDirs(getprop("/source"));
adjust = Adjust.new("/data");
modelmgr = ModelMgr.new(getprop("/model"));
modelmgr = ModelMgr.new(getprop("/cursor"));
setlistener("/sim/signals/click", func { modelmgr.click() });
#setlistener("/sim/signals/click", printDistance);
}, 1);
@ -852,7 +853,7 @@ showModelSelectDialog = func {
w = dialog[name].addChild("list");
w.set("halign", "fill");
w.set("pref-height", 300);
w.set("property", "/model");
w.set("property", "/cursor");
forindex (var i; modellist) {
w.prop().getChild("value", i, 1).setValue(modellist[i]);
}