extras/CheckListBox: Added 'IsFullyChecked()'
authorJerome St-Louis <jerome@ecere.com>
Thu, 27 Nov 2014 04:36:50 +0000 (23:36 -0500)
committerJerome St-Louis <jerome@ecere.com>
Thu, 15 Oct 2015 00:19:26 +0000 (20:19 -0400)
- To review whether this is really needed
- GuiConfigData: Null pointer check

extras/gui/GuiConfigData.ec
extras/gui/controls/CheckListBox.ec

index 4e0f126..3c3b60a 100644 (file)
@@ -260,7 +260,8 @@ class SavedConfigWindow : Window
       if(result)
       {
          GuiConfigData data = getGuiConfigData();
-         data.timer.Start();
+         if(data)
+            data.timer.Start();
       }
       return result;
    }
index 5e8e035..ab4fed4 100644 (file)
@@ -354,6 +354,13 @@ public:
       return false;
    }
 
+   bool IsFullyChecked(DataRow row)
+   {
+      DataRow parent;
+      for(parent = row; parent; parent = parent.parent) if(rowChecks.Find(parent)) return true;
+      return false;
+   }
+
    virtual void Window::NotifyChecked(CheckListBox listBox, DataRow row);
 
    void SetDisabled(DataRow row, bool disabled)