2006-05-07 Don Allingham <don@gramps-project.org>

* src/DataViews/_PersonView.py: rebuild tree on surname change,
	don't attempt to delete/insert, since this can cause things to
	hang.



svn: r6573
This commit is contained in:
Don Allingham 2006-05-07 21:54:56 +00:00
parent 02792dc4e9
commit 426f451a0c
2 changed files with 6 additions and 28 deletions

View File

@ -1,3 +1,8 @@
2006-05-07 Don Allingham <don@gramps-project.org>
* src/DataViews/_PersonView.py: rebuild tree on surname change,
don't attempt to delete/insert, since this can cause things to
hang.
2006-05-06 Alex Roitman <shura@gramps-project.org> 2006-05-06 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsBSDDB.py (load): Use common undodb * src/GrampsDb/_GrampsBSDDB.py (load): Use common undodb
methods; reset undo history. methods; reset undo history.

View File

@ -660,34 +660,7 @@ class PersonView(PageView.PersonNavView):
if oldpath == newpath: if oldpath == newpath:
self.model.row_changed(pathval,pnode) self.model.row_changed(pathval,pnode)
else: else:
# paths different, get the new surname list self.rebuild_tree()
mylist = self.model.temp_sname_sub.get(oldpath[0],[])
path = self.model.on_get_path(node)
# delete original
self.model.row_deleted(pathval)
# delete top node of original if necessar
if len(mylist)==0:
self.model.row_deleted(pathval[0])
# determine if we need to insert a new top node',
insert = not self.model.sname_sub.has_key(newpath[0])
# assign new data
self.model.assign_data()
# insert new row if needed
if insert:
path = self.model.on_get_path(newpath[0])
pnode = self.model.get_iter(path)
self.model.row_inserted(path,pnode)
# insert new person
path = self.model.on_get_path(node)
pnode = self.model.get_iter(path)
self.model.row_inserted(path,pnode)
self.goto_active_person() self.goto_active_person()
def get_selected_objects(self): def get_selected_objects(self):