Fixed parentheses when checking conditional view-name property.
Avoids stepping through invalid views.
This commit is contained in:
parent
18db6c8a7b
commit
a0256e47ed
1 changed files with 3 additions and 2 deletions
|
@ -100,8 +100,9 @@ var stepView = func(step, force = 0) {
|
|||
n = size(views) - 1;
|
||||
elsif (n >= size(views))
|
||||
n = 0;
|
||||
if (force or (var e = (views[n].getNode("enabled"))) == nil or
|
||||
(e.getBoolValue() and (views[n].getNode("name")!=nil)))
|
||||
var e = views[n].getNode("enabled");
|
||||
if (force or (e == nil or e.getBoolValue()) and
|
||||
(views[n].getNode("name")!=nil))
|
||||
break;
|
||||
}
|
||||
setprop("/sim/current-view/view-number", n);
|
||||
|
|
Loading…
Reference in a new issue