[ocrfeeder] Fix selecting all areas



commit 01b09fdc166db80e620a094508a3efd3736634b1
Author: Joaquim Rocha <jrocha igalia com>
Date:   Fri Sep 17 18:44:37 2010 +0200

    Fix selecting all areas
    
    When one or more areas were selected and "select all areas" action is
    performed, it would add all areas to the list of selected areas without
    checking the ones already there.

 studio/customWidgets.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/studio/customWidgets.py b/studio/customWidgets.py
index ee6b176..1a9847a 100644
--- a/studio/customWidgets.py
+++ b/studio/customWidgets.py
@@ -135,7 +135,8 @@ class SelectableBoxesArea(goocanvas.Canvas):
             self.selectArea(area)
 
     def selectArea(self, area):
-        self.selected_areas.append(area)
+        if area not in self.selected_areas:
+            self.selected_areas.append(area)
         area.set_property('stroke_color_rgba',self.__rgbaToInteger(self.area_selected_stroke_rgba))
         self.grab_focus(area)
         area.connect('key_press_event', self.keyPressed)



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