daboide Commit
Revision 326
Date: 2006-01-12 09:14:03 -0800 (Thu, 12 Jan 2006)
Author: paul
Changed:
U trunk/ReportDesigner.py
Log:
The simple list comprehension wasn't enough to figure out which nodes to
select. This fixes it.
Diff:
Modified: trunk/ReportDesigner.py
===================================================================
--- trunk/ReportDesigner.py 2006-01-12 05:57:46 UTC (rev 325)
+++ trunk/ReportDesigner.py 2006-01-12 17:14:03 UTC (rev 326)
@@ -243,6 +243,7 @@
node = parentNode.appendChild(item)
node.ReportObject = frm
+
def select(self, objList):
"""Iterate through the nodes, and set their Selected status
to match if they are in the current selection of controls.
@@ -251,14 +252,19 @@
return
self._inAppSelection = True
- # First make sure all objs in objList have nodes:
+ # First make sure all objs in objList have nodes. This is just
a failsafe
+ # in case the object list hadn't been updated yet already.
for obj in objList:
if obj not in [o.ReportObject for o in self.nodes]:
self.updateDisplay()
break
- selNodes = [nn for nn in self.nodes
- if nn.ReportObject in objList]
+ # Now select the proper nodes:
+ selNodes = []
+ for obj in objList:
+ for node in self.nodes:
+ if node.ReportObject == obj and
type(node.ReportObject) == type(obj):
+ selNodes.append(node)
self.Selection = selNodes
self._inAppSelection = False
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev