Changeset 4534

Show
Ignore:
Timestamp:
09/28/08 13:47:36 (2 months ago)
Author:
ed
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ide/ClassDesigner.py

    r4509 r4534  
    11091109            code = pgDct.get("code", {}) 
    11101110            propDefs = pgDct.get("properties", {}) 
     1111            # Remove any unneeded properties 
     1112            pgDct.pop("sizerInfo", None) 
     1113            pgDct.pop("Width", None) 
     1114            pgDct.pop("Height", None) 
    11111115            try: 
    11121116                imp, clsname = nm.rsplit(".", 1) 
     
    11291133            mixClass = self.getControlClass(cls) 
    11301134            wizpage = frm.append(mixClass(pp, attProperties=atts)) 
     1135#           wizpage.AlwaysResetSizer = True 
    11311136            for mthd, cd in code.items(): 
    11321137                if not self._codeDict.get(wizpage): 
     
    11471152            # The slot count before adding controls should be 4. 
    11481153            # Add any additional slots. 
    1149             newslots = slots - 4 
     1154            newslots = 4 - len(wizSizer.Children) 
    11501155            if newslots > 0: 
    11511156                wizSizer.SlotCount += newslots 
    11521157            self._srcObj = wizpage.Sizer.ChildWindows[-1] 
    11531158            self.recreateChildren(wizpage, kids, wizpage.Sizer, True, debug=1) 
     1159#           wizpage.iterateCall("layout", resetMin=True) 
    11541160        self._srcObj = saveSrc 
    11551161 
  • trunk/ide/ClassDesignerComponents.py

    r4388 r4534  
    147147                continue 
    148148            if isinstance(self, dabo.ui.dLabel) and prop in ("Width", "Height"): 
     149                # If the width/height is controlled by the sizer, don't save it. 
     150                csz = self.ControllingSizer 
     151                szornt = csz.Orientation 
     152                exp = csz.getItemProp(self, "Expand") 
     153                prptn = csz.getItemProp(self, "Proportion") 
     154                if szornt == "Horizontal": 
     155                    if (prop == "Width") and (prptn > 0): 
     156                        continue 
     157                    elif (prop == "Height") and exp: 
     158                        continue 
     159                elif szornt == "Vertical": 
     160                    if (prop == "Width") and exp: 
     161                        continue 
     162                    elif (prop == "Height") and (prptn > 0): 
     163                        continue 
    149164                # Don't copy the size if AutoSize=True and the width is close to the default size. 
    150165                if self.AutoResize: