* src/gramps_main.py: just update information after an edit

instead of deleting/re-enter. Caused pygtk to segfault
* src/PeopleView.py: provide update person function
* src/dialog.glade: remove unused callbacks


svn: r2367
This commit is contained in:
Don Allingham 2003-11-24 02:56:13 +00:00
parent 66c6136288
commit 979bdc6808
3 changed files with 19 additions and 4 deletions

View File

@ -397,3 +397,21 @@ class PeopleView:
def redisplay_person_list(self,person):
self.add_to_person_list(person,1)
def update_person_list(self,person,old_id):
key = person.getId()
if old_id != key:
(model,iter) = self.id2col[old_id]
del self.id2col[old_id]
self.id2col[key] = (model,iter)
else:
(model,iter) = self.id2col[key]
val = self.parent.db.getPersonDisplay(person.getId())
pg = unicode(val[5])
pg = pg[0]
if self.DataFilter.compare(person):
col = 0
for object in val[:-1]:
model.model.set_value(iter,col,object)
col = col + 1

View File

@ -928,7 +928,6 @@
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-6</property>
<signal name="clicked" handler="destroy_passed_object" object="attr_edit"/>
</widget>
</child>
@ -942,7 +941,6 @@
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-5</property>
<signal name="clicked" handler="on_attr_edit_ok_clicked" object="attr_edit"/>
</widget>
</child>

View File

@ -1586,8 +1586,7 @@ class Gramps:
def update_after_edit(self,epo,plist):
if epo:
self.db.buildPersonDisplay(epo.person.getId(),epo.original_id)
self.people_view.remove_from_person_list(epo.person,epo.original_id)
self.people_view.redisplay_person_list(epo.person)
self.people_view.update_person_list(epo.person,epo.original_id)
for p in plist:
self.place_view.new_place_after_edit(p)
self.update_display(0)