dabo Commit
Revision 5448
Date: 2009-10-04 13:11:02 -0700 (Sun, 04 Oct 2009)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5448

Changed:
U   trunk/dabo/ui/dDataControlMixinBase.py
U   trunk/dabo/ui/dialogs/PreferenceDialog.py

Log:
Fixed an issue when setting the DataSource to a dPref object. Previously we 
were essentially checking for bool(self.DataSource), but when the DataSource is 
a dPref, it will always return False.


Diff:
Modified: trunk/dabo/ui/dDataControlMixinBase.py
===================================================================
--- trunk/dabo/ui/dDataControlMixinBase.py      2009-10-01 18:28:31 UTC (rev 
5447)
+++ trunk/dabo/ui/dDataControlMixinBase.py      2009-10-04 20:11:02 UTC (rev 
5448)
@@ -103,7 +103,7 @@
                if getattr(self, "SelectOnEntry", False) and 
self.Form.ActiveControl == self:
                        self.selectAll()
 
-               if not self.DataSource or not self.DataField:
+               if not (self.DataSource or isinstance(self.DataSource, 
dabo.dPref)) or not self.DataField:
                        return
                if self._DesignerMode:
                        return
@@ -210,7 +210,7 @@
                                self._userChanged = False
                
                        if not self._DesignerMode:
-                               if self.DataSource and self.DataField:
+                               if (self.DataSource or 
isinstance(self.DataSource, dabo.dPref)) and self.DataField:
                                        src = self.Source
                                        if self._srcIsBizobj:
                                                try:
@@ -388,7 +388,7 @@
                if self.__src is None:
                        ds = self.DataSource
                        self._srcIsBizobj = False
-                       if ds:
+                       if (ds or isinstance(ds, dabo.dPref)):
                                # First, see if it's a string
                                if isinstance(ds, basestring):
                                        # Source can be a bizobj, which we get 
from the form, or

Modified: trunk/dabo/ui/dialogs/PreferenceDialog.py
===================================================================
--- trunk/dabo/ui/dialogs/PreferenceDialog.py   2009-10-01 18:28:31 UTC (rev 
5447)
+++ trunk/dabo/ui/dialogs/PreferenceDialog.py   2009-10-04 20:11:02 UTC (rev 
5448)
@@ -62,6 +62,7 @@
                if incl or self.IncludeFrameworkPages:
                        self._addFrameworkPages()
                self.Sizer.append1x(self.pglCategory)
+               self.update()
                self.layout()
        
        




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to