X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3dd9536f2e362870ed52d7a1e5cfd6e6abc1ee23..e2813725c9c8d409b3b99768abc2dcf9ee1fa76f:/wxPython/wx/lib/ogl/_lines.py diff --git a/wxPython/wx/lib/ogl/_lines.py b/wxPython/wx/lib/ogl/_lines.py index 819fa6704d..6b6e4cf59b 100644 --- a/wxPython/wx/lib/ogl/_lines.py +++ b/wxPython/wx/lib/ogl/_lines.py @@ -310,7 +310,7 @@ class LineShape(Shape): line_y = (last_point[1] + second_last_point[1]) / 2.0 point = wx.RealPoint(line_x, line_y) - self._lineControlPoints.insert(len(self._lineControlPoints), point) + self._lineControlPoints.insert(len(self._lineControlPoints)-1, point) def DeleteLineControlPoint(self): """Delete an arbitary point on the line.""" @@ -1375,7 +1375,7 @@ class LineShape(Shape): """ for arrow in self._arcArrows: if (position == -1 or position == arrow.GetArrowEnd()) and arrow.GetName() == name: - return arow + return arrow return None @@ -1511,12 +1511,7 @@ class LineShape(Shape): labelShape._shapeRegion.SetSize(labelShape.GetWidth(), labelShape.GetHeight()) # Find position in line's region list - i = 0 - for region in self.GetRegions(): - if labelShape._shapeRegion == region: - self.GetRegions().remove(region) - else: - i += 1 + i = self._regions.index(labelShape._shapeRegion) xx, yy = self.GetLabelPosition(i) # Set the region's offset, relative to the default position for