]> git.saurik.com Git - wxWidgets.git/commitdiff
Correct way to find the region
authorRobin Dunn <robin@alldunn.com>
Wed, 6 Apr 2005 19:29:34 +0000 (19:29 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 6 Apr 2005 19:29:34 +0000 (19:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/ogl/_lines.py

index ea4b9ea959371ee703280e26777222e75ea0f6d9..5bfd6bd4e636d74d7b9d45aade1de533d7ab8c2f 100644 (file)
@@ -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