* 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
This commit is contained in:
parent
2da2f0ed04
commit
ca4a8962bb
@ -541,7 +541,7 @@ 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:
|
if cpage == PERSON_VIEW or cpage == FAMILY_VIEW2 or cpage == FAMILY_VIEW1:
|
||||||
self.load_selected_people(obj)
|
self.load_selected_people(obj)
|
||||||
elif cpage == SOURCE_VIEW:
|
elif cpage == SOURCE_VIEW:
|
||||||
self.source_view.on_edit_clicked(obj)
|
self.source_view.on_edit_clicked(obj)
|
||||||
@ -552,7 +552,7 @@ class Gramps:
|
|||||||
|
|
||||||
def add_button_clicked(self,obj):
|
def add_button_clicked(self,obj):
|
||||||
cpage = self.views.get_current_page()
|
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)
|
self.load_new_person(obj)
|
||||||
elif cpage == SOURCE_VIEW:
|
elif cpage == SOURCE_VIEW:
|
||||||
self.source_view.on_add_clicked(obj)
|
self.source_view.on_add_clicked(obj)
|
||||||
@ -563,7 +563,7 @@ class Gramps:
|
|||||||
|
|
||||||
def remove_button_clicked(self,obj):
|
def remove_button_clicked(self,obj):
|
||||||
cpage = self.views.get_current_page()
|
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)
|
self.delete_person_clicked(obj)
|
||||||
elif cpage == SOURCE_VIEW:
|
elif cpage == SOURCE_VIEW:
|
||||||
self.source_view.on_delete_clicked(obj)
|
self.source_view.on_delete_clicked(obj)
|
||||||
@ -1264,6 +1264,9 @@ 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:
|
||||||
|
self.back_clicked(None)
|
||||||
|
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)
|
||||||
@ -1492,7 +1495,7 @@ class Gramps:
|
|||||||
self.people_view.goto_active_person()
|
self.people_view.goto_active_person()
|
||||||
self.merge_button.set_sensitive(1)
|
self.merge_button.set_sensitive(1)
|
||||||
elif page == FAMILY_VIEW1 or page == FAMILY_VIEW2:
|
elif page == FAMILY_VIEW1 or page == FAMILY_VIEW2:
|
||||||
self.enable_buttons(0)
|
self.enable_buttons(1)
|
||||||
self.merge_button.set_sensitive(0)
|
self.merge_button.set_sensitive(0)
|
||||||
self.family_view.load_family()
|
self.family_view.load_family()
|
||||||
elif page == PEDIGREE_VIEW:
|
elif page == PEDIGREE_VIEW:
|
||||||
|
Loading…
Reference in New Issue
Block a user