[alacarte] MainWindow: work when deselecting things



commit c6ccf40aa8d8210a46171e82b1611956c93508cf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue May 1 17:21:09 2012 -0400

    MainWindow: work when deselecting things

 Alacarte/MainWindow.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py
index 7302833..42fa509 100644
--- a/Alacarte/MainWindow.py
+++ b/Alacarte/MainWindow.py
@@ -374,6 +374,8 @@ class MainWindow(object):
 
     def on_menu_tree_cursor_changed(self, treeview):
         menus, iter = treeview.get_selection().get_selected()
+        if iter is None:
+            return
         menu_path = menus.get_path(iter)
         item_tree = self.tree.get_object('item_tree')
         item_tree.get_selection().unselect_all()



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