--- a/LDViewer.py Mon Feb 20 00:37:01 2012 +0100
+++ b/LDViewer.py Mon Feb 20 15:21:10 2012 +0100
@@ -259,18 +259,18 @@
return i
return None
- def FindElement(self, event, exclude_group = False):
+ def FindElement(self, event, exclude_group = False, connectors = True):
if self.GetDrawingMode() == FREEDRAWING_MODE:
- return Viewer.FindElement(self, event, exclude_group)
+ return Viewer.FindElement(self, event, exclude_group, connectors)
dc = self.GetLogicalDC()
pos = event.GetLogicalPosition(dc)
if self.SelectedElement and not isinstance(self.SelectedElement, (Graphic_Group, Wire)):
- if self.SelectedElement.HitTest(pos) or self.SelectedElement.TestHandle(pos) != (0, 0):
+ if self.SelectedElement.HitTest(pos, connectors) or self.SelectedElement.TestHandle(pos) != (0, 0):
return self.SelectedElement
elements = []
for element in self.GetElements(sort_wires=True):
- if element.HitTest(pos) or element.TestHandle(event) != (0, 0):
+ if element.HitTest(pos, connectors) or element.TestHandle(event) != (0, 0):
elements.append(element)
if len(elements) == 1:
return elements[0]