fuel dialog: add tank checkbox only if the "selected" property is actually
writable. This omits the box: <selected type="bool" write="n">1</selected>
This commit is contained in:
parent
71f80dff34
commit
291ba987d3
1 changed files with 7 additions and 4 deletions
|
@ -773,10 +773,13 @@ var showWeightDialog = func {
|
||||||
title.set("label", tname);
|
title.set("label", tname);
|
||||||
title.set("halign", "right");
|
title.set("halign", "right");
|
||||||
|
|
||||||
var sel = tcell(fuelTable, "checkbox", i+1, 1);
|
var selected = props.globals.initNode(tankprop ~ "/selected", 1, "BOOL");
|
||||||
sel.set("property", tankprop ~ "/selected");
|
if (selected.getAttribute("writable")) {
|
||||||
sel.set("live", 1);
|
var sel = tcell(fuelTable, "checkbox", i+1, 1);
|
||||||
sel.setBinding("dialog-apply");
|
sel.set("property", tankprop ~ "/selected");
|
||||||
|
sel.set("live", 1);
|
||||||
|
sel.setBinding("dialog-apply");
|
||||||
|
}
|
||||||
|
|
||||||
var slider = tcell(fuelTable, "slider", i+1, 2);
|
var slider = tcell(fuelTable, "slider", i+1, 2);
|
||||||
slider.set("property", tankprop ~ "/level-gal_us");
|
slider.set("property", tankprop ~ "/level-gal_us");
|
||||||
|
|
Loading…
Add table
Reference in a new issue