[hamster-applet] don't die if clicked in blank



commit b87072ff3802af2d5276bccd5f6d4a6ee49d4b95
Author: Toms Bauģis <toms baugis gmail com>
Date:   Wed May 5 21:08:21 2010 +0100

    don't die if clicked in blank

 src/hamster/widgets/tags.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/hamster/widgets/tags.py b/src/hamster/widgets/tags.py
index 582e754..d8d9ced 100644
--- a/src/hamster/widgets/tags.py
+++ b/src/hamster/widgets/tags.py
@@ -253,6 +253,9 @@ class TagBox(graphics.Scene):
 
 
     def on_tag_click(self, area, event, targets):
+        if not targets:
+            return
+        
         tag = targets[0]
         if tag.text in self.selected_tags:
             self.emit("tag-unselected", tag.text)



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