[gnome-contacts] ContactPane: fix leave edit-mode when no contact is set



commit f873e5789ceee8aec5a3eb31b7fbebffd84c20c2
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Sun Aug 10 13:52:34 2014 -0400

    ContactPane: fix leave edit-mode when no contact is set

 src/contacts-contact-pane.vala |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index cd49216..9c5bf16 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -391,9 +391,13 @@ public class Contacts.ContactPane : Notebook {
 
       editor.clear ();
 
-      sheet.clear ();
-      sheet.update (contact);
-      set_current_page (1);
+      if (contact != null) {
+       sheet.clear ();
+       sheet.update (contact);
+       set_current_page (1);
+      } else {
+       show_none_selected_view ();
+      }
     }
   }
 


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