From 4a373a8a370bffdb9878c88118348964a75db131 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 14 Apr 2006 22:31:23 +0000 Subject: [PATCH] 2006-04-14 Alex Roitman * src/DisplayTabs.py (edit_button_clicked): Proceed only if selection exists. svn: r6345 --- ChangeLog | 4 ++++ src/DisplayTabs.py | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4ae84ca6..604317a91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-04-14 Alex Roitman + * src/DisplayTabs.py (edit_button_clicked): Proceed only if + selection exists. + 2006-04-14 Don Allingham * src/GrampsDb/_ReadXML.py: handle ChildRefType * src/GrampsDb/_ConstXML.py: remove unused map diff --git a/src/DisplayTabs.py b/src/DisplayTabs.py index 9f7a4e0e3..a92952cc1 100644 --- a/src/DisplayTabs.py +++ b/src/DisplayTabs.py @@ -1237,15 +1237,15 @@ class PersonRefEmbedList(EmbeddedList): self.rebuild() def edit_button_clicked(self, obj): - from Editors import EditPersonRef - - try: - ref = self.get_selected() - EditPersonRef( - self.dbstate, self.uistate, self.track, - ref, self.edit_callback) - except Errors.WindowActiveError: - pass + ref = self.get_selected() + if ref: + try: + from Editors import EditPersonRef + EditPersonRef( + self.dbstate, self.uistate, self.track, + ref, self.edit_callback) + except Errors.WindowActiveError: + pass def edit_callback(self, obj): self.rebuild()