1
0
Fork 0

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:
mfranz 2008-12-04 11:34:05 +00:00
parent 71f80dff34
commit 291ba987d3

View file

@ -773,10 +773,13 @@ var showWeightDialog = func {
title.set("label", tname);
title.set("halign", "right");
var sel = tcell(fuelTable, "checkbox", i+1, 1);
sel.set("property", tankprop ~ "/selected");
sel.set("live", 1);
sel.setBinding("dialog-apply");
var selected = props.globals.initNode(tankprop ~ "/selected", 1, "BOOL");
if (selected.getAttribute("writable")) {
var sel = tcell(fuelTable, "checkbox", i+1, 1);
sel.set("property", tankprop ~ "/selected");
sel.set("live", 1);
sel.setBinding("dialog-apply");
}
var slider = tcell(fuelTable, "slider", i+1, 2);
slider.set("property", tankprop ~ "/level-gal_us");