dabo Commit
Revision 5095
Date: 2009-03-01 17:55:43 -0800 (Sun, 01 Mar 2009)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5095
Changed:
U trunk/ide/ClassDesigner.py
Log:
Found another place where the changes to default sizer props was not being
properly restored.
Diff:
Modified: trunk/ide/ClassDesigner.py
===================================================================
--- trunk/ide/ClassDesigner.py 2009-03-01 20:14:36 UTC (rev 5094)
+++ trunk/ide/ClassDesigner.py 2009-03-02 01:55:43 UTC (rev 5095)
@@ -823,8 +823,14 @@
# It has a given
position, so use that. Otherwise,
# they may be pasting
into a grid sizer.
self._srcObj =
szr.getItemByRowCol(row, col)
+ grdsz = isinstance(szr, dui.dGridSizer)
+ if grdsz:
+ szType = "Grid"
+ else:
+ szType = szr.Orientation
+ # Get the defaults for this class of
control.
+ defSizerProps =
self.getDefaultSizerProps(cls, szType)
props = {}
-
try:
imp, clsname = cls.rsplit(".", 1)
imptSt = "from %(imp)s import
%(clsname)s" % locals()
@@ -835,7 +841,6 @@
except ValueError:
dct["fullname"] = cls
newClass = dui.__dict__[cls]
-
isGrid = issubclass(newClass, dui.dGrid)
isTree = issubclass(newClass, dui.dTreeView)
isSplitter = issubclass(newClass, dui.dSplitter)
@@ -890,7 +895,8 @@
sz = None
itm = None
if sz is not None and itm is not None:
- sz.setItemProps(itm, sizerInfoDict)
+ defSizerProps.update(sizerInfoDict)
+ sz.setItemProps(itm, defSizerProps)
if classID:
obj.classID = classID
_______________________________________________
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]