diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 820c907cc..c46b716ee 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,13 @@ +2003-10-12 Alex Roitman + * src/gramps_main.py (edit_button_clicked): Modify edit person call + to always handle currently active person in family view; + (delete_person_clicked): Use single person mlist for family views; + (delete_person_response): Replace Back with just setting active + person to current history index (remove_from_history already places + hindex in the correct place). Always call redraw_histmenu(). + * src/FamilyView.py (spouse_swap): Use change_active_person() call + in order to correctly build history. + 2003-10-12 Don Allingham * src/gramps_main.py: enabled Add/Edit/Remove buttons for family view, perform a "back button" operation when a person is deleted. Instead of diff --git a/gramps2/src/FamilyView.py b/gramps2/src/FamilyView.py index 4ced05c4b..c90856b4a 100644 --- a/gramps2/src/FamilyView.py +++ b/gramps2/src/FamilyView.py @@ -18,6 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ #------------------------------------------------------------------------- # @@ -619,7 +620,7 @@ class FamilyView: def spouse_swap(self,obj): if self.selected_spouse: - self.parent.active_person = self.selected_spouse + self.parent.change_active_person(self.selected_spouse) self.load_family(self.family) def ap_parents_clicked(self,obj): diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 29c98c2d8..35a78a2e3 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -541,8 +541,10 @@ class Gramps: def edit_button_clicked(self,obj): cpage = self.views.get_current_page() - if cpage == PERSON_VIEW or cpage == FAMILY_VIEW2 or cpage == FAMILY_VIEW1: + if cpage == PERSON_VIEW: self.load_selected_people(obj) + elif cpage == FAMILY_VIEW2 or cpage == FAMILY_VIEW1: + self.load_person(self.active_person) elif cpage == SOURCE_VIEW: self.source_view.on_edit_clicked(obj) elif cpage == PLACE_VIEW: @@ -1221,7 +1223,11 @@ class Gramps: DisplayTrace.DisplayTrace() def delete_person_clicked(self,obj): - mlist = self.people_view.person_tree.get_selected_objects() + cpage = self.views.get_current_page() + if cpage == PERSON_VIEW: + mlist = self.people_view.person_tree.get_selected_objects() + else: + mlist = [ self.active_person.getId() ] for sel in mlist: p = self.db.getPerson(sel) @@ -1264,11 +1270,11 @@ class Gramps: self.people_view.remove_from_person_list(self.active_person) self.people_view.person_model.sort_column_changed() - if self.hindex > 0: - self.back_clicked(None) + if self.hindex >= 0: + self.active_person = self.db.getPerson(self.history[self.hindex]) else: self.change_active_person(None) - self.redraw_histmenu() + self.redraw_histmenu() self.update_display(0) Utils.modified()