[ocrfeeder] Prevent invisible boxes creation



commit 333e49fbf1c0f88be30cbf7796a296a4d420f983
Author: Joaquim Rocha <jrocha igalia com>
Date:   Fri Sep 17 20:12:03 2010 +0200

    Prevent invisible boxes creation
    
    Boxes with a width and height of 0 were being created when the user
    did double or tripple click.

 studio/customWidgets.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/studio/customWidgets.py b/studio/customWidgets.py
index 1a9847a..5bb3269 100644
--- a/studio/customWidgets.py
+++ b/studio/customWidgets.py
@@ -212,6 +212,8 @@ class SelectableBoxesArea(goocanvas.Canvas):
         return self.image.props.height, self.image.props.width
 
     def startSelectionArea(self, item, target, event):
+        if event.type != gtk.gdk.BUTTON_PRESS:
+            return False
         self.deselectAreas()
         fill_color = self.__rgbaToInteger(self.area_fill_rgba)
         stroke_color = self.__rgbaToInteger(self.area_stroke_rgba)



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