# HG changeset patch # User lbessard # Date 1227284042 -3600 # Node ID fab9a51d5b5759b38d1bde2fafa2835540a85983 # Parent 67da12c94d2d5f105b3f36c6798607bc791ad409 Bugs on Group copy fixed diff -r 67da12c94d2d -r fab9a51d5b57 graphics/FBD_Objects.py --- a/graphics/FBD_Objects.py Fri Nov 21 13:45:25 2008 +0100 +++ b/graphics/FBD_Objects.py Fri Nov 21 17:14:02 2008 +0100 @@ -343,6 +343,18 @@ handle.SetEdge(edge) self.RefreshModel(False) +## # Method called when a Motion event have been generated +## def OnMotion(self, event, dc, scaling): +## if not event.Dragging(): +## pos = event.GetLogicalPosition(dc) +## for input in self.Inputs: +## rect = input.GetRedrawRect() +## if rect.InsideXY(pos.x, pos.y): +## print "Find input" +## tip = wx.TipWindow(self.Parent, "Test") +## tip.SetBoundingRect(rect) +## return Graphic_Element.OnMotion(self, event, dc, scaling) + # Method called when a LeftDClick event have been generated def OnLeftDClick(self, event, dc, scaling): # Edit the block properties @@ -456,7 +468,7 @@ def GetConnectorTranslation(self, element): connectors = {} if self.Input is not None: - connector[self.Input] = element.Input + connectors[self.Input] = element.Input if self.Output is not None: connectors[self.Output] = element.Output return connectors diff -r 67da12c94d2d -r fab9a51d5b57 graphics/GraphicCommons.py --- a/graphics/GraphicCommons.py Fri Nov 21 13:45:25 2008 +0100 +++ b/graphics/GraphicCommons.py Fri Nov 21 17:14:02 2008 +0100 @@ -707,7 +707,8 @@ else: new_wire = element.Clone(parent, connectors) if new_wire is not None: - parent.AddWire(new_wire) + if pos is not None: + parent.AddWire(new_wire) group.SelectElement(new_wire) if pos is not None: for element in group.Elements: diff -r 67da12c94d2d -r fab9a51d5b57 graphics/SFC_Objects.py --- a/graphics/SFC_Objects.py Fri Nov 21 13:45:25 2008 +0100 +++ b/graphics/SFC_Objects.py Fri Nov 21 17:14:02 2008 +0100 @@ -114,7 +114,7 @@ def GetConnectorTranslation(self, element): connectors = {} if self.Input is not None: - connector[self.Input] = element.Input + connectors[self.Input] = element.Input if self.Output is not None: connectors[self.Output] = element.Output if self.Action is not None: