From ca4a8962bbf1edc0d8ccf8a05af639d6a82494a4 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 13 Oct 2003 03:12:27 +0000 Subject: [PATCH] * src/gramps_main.py: enabled Add/Edit/Remove buttons for family view, perform a "back button" operation when a person is deleted. Instead of leaving no one selected, go back to the previous person. svn: r2243 --- gramps2/src/gramps_main.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 0e4972530..29c98c2d8 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -541,7 +541,7 @@ class Gramps: def edit_button_clicked(self,obj): cpage = self.views.get_current_page() - if cpage == PERSON_VIEW: + if cpage == PERSON_VIEW or cpage == FAMILY_VIEW2 or cpage == FAMILY_VIEW1: self.load_selected_people(obj) elif cpage == SOURCE_VIEW: self.source_view.on_edit_clicked(obj) @@ -552,7 +552,7 @@ class Gramps: def add_button_clicked(self,obj): cpage = self.views.get_current_page() - if cpage == PERSON_VIEW: + if cpage == PERSON_VIEW or cpage == FAMILY_VIEW2 or cpage == FAMILY_VIEW1: self.load_new_person(obj) elif cpage == SOURCE_VIEW: self.source_view.on_add_clicked(obj) @@ -563,7 +563,7 @@ class Gramps: def remove_button_clicked(self,obj): cpage = self.views.get_current_page() - if cpage == PERSON_VIEW: + if cpage == PERSON_VIEW or cpage == FAMILY_VIEW2 or cpage == FAMILY_VIEW1: self.delete_person_clicked(obj) elif cpage == SOURCE_VIEW: self.source_view.on_delete_clicked(obj) @@ -1264,8 +1264,11 @@ class Gramps: self.people_view.remove_from_person_list(self.active_person) self.people_view.person_model.sort_column_changed() - self.change_active_person(None) - self.redraw_histmenu() + if self.hindex > 0: + self.back_clicked(None) + else: + self.change_active_person(None) + self.redraw_histmenu() self.update_display(0) Utils.modified() @@ -1492,7 +1495,7 @@ class Gramps: self.people_view.goto_active_person() self.merge_button.set_sensitive(1) elif page == FAMILY_VIEW1 or page == FAMILY_VIEW2: - self.enable_buttons(0) + self.enable_buttons(1) self.merge_button.set_sensitive(0) self.family_view.load_family() elif page == PEDIGREE_VIEW: