Correct way to find the region
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1511,12 +1511,7 @@ class LineShape(Shape):
|
|||||||
labelShape._shapeRegion.SetSize(labelShape.GetWidth(), labelShape.GetHeight())
|
labelShape._shapeRegion.SetSize(labelShape.GetWidth(), labelShape.GetHeight())
|
||||||
|
|
||||||
# Find position in line's region list
|
# Find position in line's region list
|
||||||
i = 0
|
i = self._regions.index(labelShape._shapeRegion)
|
||||||
for region in self.GetRegions():
|
|
||||||
if labelShape._shapeRegion == region:
|
|
||||||
self.GetRegions().remove(region)
|
|
||||||
else:
|
|
||||||
i += 1
|
|
||||||
|
|
||||||
xx, yy = self.GetLabelPosition(i)
|
xx, yy = self.GetLabelPosition(i)
|
||||||
# Set the region's offset, relative to the default position for
|
# Set the region's offset, relative to the default position for
|
||||||
|
Reference in New Issue
Block a user