- empty legend input field when no object is selected/available
- tweaks & cleanup
This commit is contained in:
parent
783c5cde5f
commit
671c30449d
2 changed files with 8 additions and 6 deletions
|
@ -39,7 +39,7 @@
|
|||
</key>
|
||||
<key>
|
||||
<name>space bar + mouse click</name>
|
||||
<desc>select nearest model (blinks twice)</desc>
|
||||
<desc>select nearest model (flashes)</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>space bar + cursor up/down</name>
|
||||
|
|
|
@ -59,8 +59,7 @@ xyz2lonlat = func(xyz) {
|
|||
var x = xyz[0];
|
||||
var y = xyz[1];
|
||||
var z = xyz[2];
|
||||
var aux = x * x + y * y;
|
||||
var lat = math.atan2(z, math.sqrt(aux)) * R2D;
|
||||
var lat = math.atan2(z, math.sqrt(x * x + y * y)) * R2D;
|
||||
var lon = math.atan2(y, x) * R2D;
|
||||
return [lon, lat];
|
||||
}
|
||||
|
@ -623,8 +622,11 @@ ModelMgr = {
|
|||
me.static = left;
|
||||
}
|
||||
}
|
||||
if (me.dynamic != nil) {
|
||||
me.dynamic.flash(4);
|
||||
# last object removed?
|
||||
if (me.dynamic == nil) {
|
||||
adjust.legendN.setValue("");
|
||||
} else {
|
||||
me.dynamic.flash(6);
|
||||
}
|
||||
me.display_status(me.modelpath);
|
||||
},
|
||||
|
@ -643,7 +645,7 @@ ModelMgr = {
|
|||
me.display_status(path);
|
||||
},
|
||||
display_status : func(p) {
|
||||
var count = (me.dynamic == nil ? 0 : 1) + size(me.static);
|
||||
var count = (me.dynamic != nil) + size(me.static);
|
||||
setprop("/sim/model/ufo/status", "(" ~ count ~ ") " ~ p);
|
||||
},
|
||||
get_data : func {
|
||||
|
|
Loading…
Reference in a new issue