only open popup if there's something to choose from
This commit is contained in:
parent
8bb50c1871
commit
de80ed4b1c
1 changed files with 2 additions and 0 deletions
|
@ -79,6 +79,8 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
|
if (size(view.model_view_handler.list) <= 1)
|
||||||
|
return;
|
||||||
var isopen = !!getprop("sim/gui/dialogs/model-view-select/open");
|
var isopen = !!getprop("sim/gui/dialogs/model-view-select/open");
|
||||||
var toggle = isopen ? "dialog-close" : "dialog-show";
|
var toggle = isopen ? "dialog-close" : "dialog-show";
|
||||||
fgcommand(toggle, props.Node.new({ "dialog-name": "model-view-select" }));
|
fgcommand(toggle, props.Node.new({ "dialog-name": "model-view-select" }));
|
||||||
|
|
Loading…
Reference in a new issue