dabo Commit
Revision 4534
Date: 2008-09-28 13:47:36 -0700 (Sun, 28 Sep 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4534

Changed:
U   trunk/ide/ClassDesigner.py
U   trunk/ide/ClassDesignerComponents.py

Log:
Fixed some issues that affected the behavior of wizards in the Class Designer. 


Diff:
Modified: trunk/ide/ClassDesigner.py
===================================================================
--- trunk/ide/ClassDesigner.py  2008-09-27 13:54:48 UTC (rev 4533)
+++ trunk/ide/ClassDesigner.py  2008-09-28 20:47:36 UTC (rev 4534)
@@ -1108,6 +1108,10 @@
                        nm = pgDct["name"]
                        code = pgDct.get("code", {})
                        propDefs = pgDct.get("properties", {})
+                       # Remove any unneeded properties
+                       pgDct.pop("sizerInfo", None)
+                       pgDct.pop("Width", None)
+                       pgDct.pop("Height", None)
                        try:
                                imp, clsname = nm.rsplit(".", 1)
                                imptSt = "from %(imp)s import %(clsname)s" % 
locals()
@@ -1128,6 +1132,7 @@
                                pass
                        mixClass = self.getControlClass(cls)
                        wizpage = frm.append(mixClass(pp, attProperties=atts))
+#                      wizpage.AlwaysResetSizer = True
                        for mthd, cd in code.items():
                                if not self._codeDict.get(wizpage):
                                        self._codeDict[wizpage] = {}
@@ -1146,11 +1151,12 @@
                        wizSizer.DefaultSpacing = 0
                        # The slot count before adding controls should be 4.
                        # Add any additional slots.
-                       newslots = slots - 4
+                       newslots = 4 - len(wizSizer.Children)
                        if newslots > 0:
                                wizSizer.SlotCount += newslots
                        self._srcObj = wizpage.Sizer.ChildWindows[-1]
                        self.recreateChildren(wizpage, kids, wizpage.Sizer, 
True, debug=1)
+#                      wizpage.iterateCall("layout", resetMin=True)
                self._srcObj = saveSrc
 
 

Modified: trunk/ide/ClassDesignerComponents.py
===================================================================
--- trunk/ide/ClassDesignerComponents.py        2008-09-27 13:54:48 UTC (rev 
4533)
+++ trunk/ide/ClassDesignerComponents.py        2008-09-28 20:47:36 UTC (rev 
4534)
@@ -146,6 +146,21 @@
                                        "Height") and 
self.ControllingSizer.getItemProp(self, "Expand"):
                                continue
                        if isinstance(self, dabo.ui.dLabel) and prop in 
("Width", "Height"):
+                               # If the width/height is controlled by the 
sizer, don't save it.
+                               csz = self.ControllingSizer
+                               szornt = csz.Orientation
+                               exp = csz.getItemProp(self, "Expand")
+                               prptn = csz.getItemProp(self, "Proportion")
+                               if szornt == "Horizontal":
+                                       if (prop == "Width") and (prptn > 0):
+                                               continue
+                                       elif (prop == "Height") and exp:
+                                               continue
+                               elif szornt == "Vertical":
+                                       if (prop == "Width") and exp:
+                                               continue
+                                       elif (prop == "Height") and (prptn > 0):
+                                               continue
                                # Don't copy the size if AutoSize=True and the 
width is close to the default size.
                                if self.AutoResize:
                                        defWd, defHt = 
dabo.ui.fontMetric(wind=self)




_______________________________________________
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