daboide Commit
Revision 645
Date: 2006-10-08 18:25:23 -0700 (Sun, 08 Oct 2006)
Author: ed
Changed:
U trunk/ClassDesignerFormMixin.py
Log:
Fixed a bug when selecting objects in a sizer-based design that were contained
in another control. Some code changes to accomodate non-sizer designs had been
added without an appropriate 'if' to limit when it ran.
Diff:
Modified: trunk/ClassDesignerFormMixin.py
===================================================================
--- trunk/ClassDesignerFormMixin.py 2006-10-09 00:03:21 UTC (rev 644)
+++ trunk/ClassDesignerFormMixin.py 2006-10-09 01:25:23 UTC (rev 645)
@@ -150,29 +150,30 @@
# That's just a dummy base, so select the form instead
obj = self
else:
- # We need to determine if the object is a child of the
active
- # container, If so, select it normally. If not, see if
it is contained
- # at some level by the active container, or if it is
completely
- # outside of it. If it is within, treat this as a click
on the parent
- # container that is the outermost child of the
ActiveContainer.
- # If it is outside of the ActiveContainer, make the new
- # ActiveContainer the first common container between
the clicked
- # object and the old ActiveContainer.
- ac = self.ActiveContainer
- if obj.Parent is ac:
- # Normal
- pass
- elif obj is ac:
- # Background click; deselect all objects
- obj = []
- elif self.objectIsContainedBy(obj, ac):
- # Find ac child that contains obj
- obj = self.findActiveContainerChild(obj)
- else:
- # Not contained. Find the first common
container for obj and ac
- # and select that.
- cnt = self.firstCommonContainer(obj, ac)
- self.ActiveContainer = cnt
+ if not self.UseSizers:
+ # We need to determine if the object is a child
of the active
+ # container, If so, select it normally. If not,
see if it is contained
+ # at some level by the active container, or if
it is completely
+ # outside of it. If it is within, treat this as
a click on the parent
+ # container that is the outermost child of the
ActiveContainer.
+ # If it is outside of the ActiveContainer, make
the new
+ # ActiveContainer the first common container
between the clicked
+ # object and the old ActiveContainer.
+ ac = self.ActiveContainer
+ if obj.Parent is ac:
+ # Normal
+ pass
+ elif obj is ac:
+ # Background click; deselect all objects
+ obj = []
+ elif self.objectIsContainedBy(obj, ac):
+ # Find ac child that contains obj
+ obj = self.findActiveContainerChild(obj)
+ else:
+ # Not contained. Find the first common
container for obj and ac
+ # and select that.
+ cnt = self.firstCommonContainer(obj, ac)
+ self.ActiveContainer = cnt
origSel = self.app.Selection
self.app.select(obj, shift)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev