diff mde/gui/WidgetData.d @ 78:79a1809421aa

Widget data saving reimplemented for the new data system. (Now grid layout widgets remember their row & column sizes.)
author Diggory Hardy <diggory.hardy@gmail.com>
date Tue, 29 Jul 2008 18:14:53 +0100
parents 3dfd934100f7
children 61ea26abe4dd
line wrap: on
line diff
--- a/mde/gui/WidgetData.d	Tue Jul 29 17:11:22 2008 +0100
+++ b/mde/gui/WidgetData.d	Tue Jul 29 18:14:53 2008 +0100
@@ -179,7 +179,8 @@
         mutex.lock;
         scope(exit) mutex.unlock;
         
-        if (noChanges)
+        // Make all widgets save any changed data; return if no changes:
+        if (!child.saveChanges ("root"))
             return;
         
         if (loadUserFile) { // merge entries from user file into current changes
@@ -234,7 +235,6 @@
     
     /** For making changes. */
     void setData (widgetID id, WidgetData d) {
-        noChanges = false;
         changes[id] = d;        // also updates WidgetDataSet in data.
     }
     
@@ -264,7 +264,6 @@
     WidgetDataChanges changes;  // Changes for the current design.
     scope mt.DataSet changesDS; // changes and sections from user file (used for saving)
     bool loadUserFile = true;   // still need to load user file for saving?
-    bool noChanges = true;      // do we have any changes to save?
     
     scope IChildWidget child;   // The primary widget.