* src/gramps_main.py (delete_person_response): Add remove_from_history
call before deleting the person. * src/PeopleView.py (remove_from_history): Add function; (row_changed) Remove extra change_active_person() call. svn: r2201
This commit is contained in:
parent
3dd61f752a
commit
463d8be93d
@ -1,3 +1,9 @@
|
|||||||
|
2003-10-06 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
|
* src/gramps_main.py (delete_person_response): Add remove_from_history
|
||||||
|
call before deleting the person.
|
||||||
|
* src/PeopleView.py (remove_from_history): Add function;
|
||||||
|
(row_changed) Remove extra change_active_person() call.
|
||||||
|
|
||||||
2003-10-06 Tim Waugh <twaugh@redhat.com>
|
2003-10-06 Tim Waugh <twaugh@redhat.com>
|
||||||
* src/Makefile.am: Ship PeopleView.py and PeopleStore.py.
|
* src/Makefile.am: Ship PeopleView.py and PeopleStore.py.
|
||||||
|
|
||||||
|
@ -84,7 +84,6 @@ class PeopleView:
|
|||||||
def row_changed(self,obj):
|
def row_changed(self,obj):
|
||||||
mlist = self.person_tree.get_selected_objects()
|
mlist = self.person_tree.get_selected_objects()
|
||||||
if mlist and mlist[0]:
|
if mlist and mlist[0]:
|
||||||
self.parent.change_active_person(self.parent.db.getPerson(mlist[0]))
|
|
||||||
try:
|
try:
|
||||||
self.parent.change_active_person(self.parent.db.getPerson(mlist[0]))
|
self.parent.change_active_person(self.parent.db.getPerson(mlist[0]))
|
||||||
except:
|
except:
|
||||||
@ -160,6 +159,22 @@ class PeopleView:
|
|||||||
if person == self.parent.active_person:
|
if person == self.parent.active_person:
|
||||||
self.parent.active_person = None
|
self.parent.active_person = None
|
||||||
|
|
||||||
|
def remove_from_history(self,person,old_id=None):
|
||||||
|
pid = person.getId()
|
||||||
|
if old_id:
|
||||||
|
del_id = old_id
|
||||||
|
else:
|
||||||
|
del_id = pid
|
||||||
|
|
||||||
|
hc = self.parent.history.count(del_id)
|
||||||
|
for c in range(hc):
|
||||||
|
self.parent.history.remove(del_id)
|
||||||
|
self.parent.hindex = self.parent.hindex - 1
|
||||||
|
|
||||||
|
mhc = self.parent.mhistory.count(del_id)
|
||||||
|
for c in range(mhc):
|
||||||
|
self.parent.mhistory.remove(del_id)
|
||||||
|
|
||||||
def apply_filter_clicked(self):
|
def apply_filter_clicked(self):
|
||||||
invert_filter = self.parent.filter_inv.get_active()
|
invert_filter = self.parent.filter_inv.get_active()
|
||||||
qualifer = self.parent.filter_text.get_text()
|
qualifer = self.parent.filter_text.get_text()
|
||||||
|
@ -1507,21 +1507,22 @@ class Gramps:
|
|||||||
if family:
|
if family:
|
||||||
family.removeChild(self.active_person)
|
family.removeChild(self.active_person)
|
||||||
|
|
||||||
|
self.people_view.remove_from_history(self.active_person)
|
||||||
self.db.removePerson(self.active_person.getId())
|
self.db.removePerson(self.active_person.getId())
|
||||||
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()
|
||||||
try:
|
|
||||||
self.mhistory = self.mhistory[:-2]
|
|
||||||
self.change_active_person(self.mhistory[-2])
|
|
||||||
except:
|
|
||||||
self.mhistory = []
|
|
||||||
self.change_active_person(None)
|
self.change_active_person(None)
|
||||||
|
self.redraw_histmenu()
|
||||||
self.update_display(0)
|
self.update_display(0)
|
||||||
Utils.modified()
|
Utils.modified()
|
||||||
|
|
||||||
def merge_update(self,p1,p2,old_id):
|
def merge_update(self,p1,p2,old_id):
|
||||||
self.people_view.remove_from_person_list(p1,old_id)
|
self.people_view.remove_from_person_list(p1,old_id)
|
||||||
self.people_view.remove_from_person_list(p2)
|
self.people_view.remove_from_person_list(p2)
|
||||||
|
self.people_view.remove_from_history(p1,old_id)
|
||||||
|
self.people_view.remove_from_history(p2)
|
||||||
|
self.redraw_histmenu()
|
||||||
self.people_view.redisplay_person_list(p1)
|
self.people_view.redisplay_person_list(p1)
|
||||||
self.update_display(0)
|
self.update_display(0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user