* 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.


svn: r2246
This commit is contained in:
Alex Roitman 2003-10-13 04:23:34 +00:00
parent b104b23a9b
commit d8d91425e4
3 changed files with 23 additions and 6 deletions

View File

@ -1,3 +1,13 @@
2003-10-12 Alex Roitman <shura@alex.neuro.umn.edu>
* 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 <dallingham@users.sourceforge.net> 2003-10-12 Don Allingham <dallingham@users.sourceforge.net>
* src/gramps_main.py: enabled Add/Edit/Remove buttons for family view, * src/gramps_main.py: enabled Add/Edit/Remove buttons for family view,
perform a "back button" operation when a person is deleted. Instead of perform a "back button" operation when a person is deleted. Instead of

View File

@ -18,6 +18,7 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id$
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -619,7 +620,7 @@ class FamilyView:
def spouse_swap(self,obj): def spouse_swap(self,obj):
if self.selected_spouse: if self.selected_spouse:
self.parent.active_person = self.selected_spouse self.parent.change_active_person(self.selected_spouse)
self.load_family(self.family) self.load_family(self.family)
def ap_parents_clicked(self,obj): def ap_parents_clicked(self,obj):

View File

@ -541,8 +541,10 @@ class Gramps:
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
cpage = self.views.get_current_page() 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) self.load_selected_people(obj)
elif cpage == FAMILY_VIEW2 or cpage == FAMILY_VIEW1:
self.load_person(self.active_person)
elif cpage == SOURCE_VIEW: elif cpage == SOURCE_VIEW:
self.source_view.on_edit_clicked(obj) self.source_view.on_edit_clicked(obj)
elif cpage == PLACE_VIEW: elif cpage == PLACE_VIEW:
@ -1221,7 +1223,11 @@ class Gramps:
DisplayTrace.DisplayTrace() DisplayTrace.DisplayTrace()
def delete_person_clicked(self,obj): 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: for sel in mlist:
p = self.db.getPerson(sel) p = self.db.getPerson(sel)
@ -1264,11 +1270,11 @@ class Gramps:
self.people_view.remove_from_person_list(self.active_person) self.people_view.remove_from_person_list(self.active_person)
self.people_view.person_model.sort_column_changed() self.people_view.person_model.sort_column_changed()
if self.hindex > 0: if self.hindex >= 0:
self.back_clicked(None) self.active_person = self.db.getPerson(self.history[self.hindex])
else: else:
self.change_active_person(None) self.change_active_person(None)
self.redraw_histmenu() self.redraw_histmenu()
self.update_display(0) self.update_display(0)
Utils.modified() Utils.modified()