From 940caa34ccf1e82f156538fa1e4d159122ac1082 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 6 Apr 2005 19:29:34 +0000 Subject: [PATCH] Correct way to find the region git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/lib/ogl/_lines.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/wxPython/wx/lib/ogl/_lines.py b/wxPython/wx/lib/ogl/_lines.py index ea4b9ea959..5bfd6bd4e6 100644 --- a/wxPython/wx/lib/ogl/_lines.py +++ b/wxPython/wx/lib/ogl/_lines.py @@ -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 -- 2.45.2