# HG changeset patch # User laurent # Date 1329747670 -3600 # Node ID aaa3b02d42b1273e94db4bec62f0a47064e57d6a # Parent ea237e1431ec23b007c410b1edbd7ca30df418eb Fix bug in LDViewer with MouseEvents diff -r ea237e1431ec -r aaa3b02d42b1 LDViewer.py --- 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]