diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index b4ae84ca6..604317a91 100644 --- a/gramps2/ChangeLog +++ b/gramps2/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/gramps2/src/DisplayTabs.py b/gramps2/src/DisplayTabs.py index 9f7a4e0e3..a92952cc1 100644 --- a/gramps2/src/DisplayTabs.py +++ b/gramps2/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()