From 291ba987d35ac9cc7c7037e30693ae90e540f2a1 Mon Sep 17 00:00:00 2001 From: mfranz Date: Thu, 4 Dec 2008 11:34:05 +0000 Subject: [PATCH] fuel dialog: add tank checkbox only if the "selected" property is actually writable. This omits the box: 1 --- Nasal/gui.nas | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Nasal/gui.nas b/Nasal/gui.nas index dc240c4f9..66847f887 100644 --- a/Nasal/gui.nas +++ b/Nasal/gui.nas @@ -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");