From 49150fa1f42437a70a8e8157f65e6ae53fd524fd Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Mon, 2 Jun 2003 15:34:08 +0000 Subject: [PATCH] * src/plugins/BookReport.py (ReportOptionsDialog.on_change_clicked): Deal with Cancel button pressed. svn: r1632 --- gramps2/src/plugins/BookReport.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gramps2/src/plugins/BookReport.py b/gramps2/src/plugins/BookReport.py index 2ac9ae65e..252fc9615 100644 --- a/gramps2/src/plugins/BookReport.py +++ b/gramps2/src/plugins/BookReport.py @@ -254,9 +254,12 @@ class ReportOptionsDialog(Report.TextReportDialog): def on_change_clicked(self,obj): import SelectPerson sel_person = SelectPerson.SelectPerson(self.db,'Select Person') - new_name = sel_person.run().getPrimaryName().getRegularName() - self.person_label.set_text( "%s" % new_name ) - self.person_label.set_use_markup(gtk.TRUE) + new_person = sel_person.run() + if new_person: + new_name = new_person.getPrimaryName().getRegularName() + if new_name: + self.person_label.set_text( "%s" % new_name ) + self.person_label.set_use_markup(gtk.TRUE) #------------------------------------------------------------------------ #