eda:gui:CheckBool; keep current value in CheckBool editor is readOnly is set.
authorRejean Loyer <redj@ecere.com>
Tue, 19 Nov 2013 21:27:25 +0000 (16:27 -0500)
committerRejean Loyer <redj@ecere.com>
Mon, 3 Feb 2014 18:22:22 +0000 (13:22 -0500)
eda/libeda/src/gui.ec

index 9bc58c2..f872d31 100644 (file)
@@ -69,7 +69,10 @@ public class CheckBool : bool
             bool DataBox::NotifyClicked(Button control, int x, int y, Modifiers mods)
             {
                bool checked = control.checked;
-               SetData(&checked, false);
+               if(readOnly)
+                  control.checked = !checked;
+               else
+                  SetData(&checked, false);
                return true;
             }
          };