[ocrfeeder] Fix attempt to remove element not in list



commit 3e873f5baa16d7bb57b629c624baba2cbc404768
Author: Joaquim Rocha <jrocha igalia com>
Date:   Wed Mar 31 18:24:50 2010 +0200

    Fix attempt to remove element not in list

 studio/customWidgets.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/studio/customWidgets.py b/studio/customWidgets.py
index 8702451..daa3b58 100644
--- a/studio/customWidgets.py
+++ b/studio/customWidgets.py
@@ -229,7 +229,8 @@ class SelectableBoxesArea(goocanvas.Canvas):
         end_point = (area.props.x + area.props.width - offset, area.props.y + area.props.height - offset)
         bounds = goocanvas.Bounds(*(start_point + end_point))
         overlaped_items = self.get_items_in_area(bounds, True, True, True)
-        overlaped_items.remove(area)
+        if area in overlaped_items:
+            overlaped_items.remove(area)
         return overlaped_items
     
     def handleOverlapedAreas(self, overlaped_areas):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]