4198: Person view does not remove a row correctly when two people are merged.

svn: r16069
This commit is contained in:
Doug Blank 2010-10-28 13:33:29 +00:00
parent d69552e4c1
commit afefbad431
9 changed files with 19 additions and 0 deletions

View File

@ -244,3 +244,4 @@ class MergeEventQuery(object):
self.database.remove_event(old_handle, trans)
self.database.commit_event(self.phoenix, trans)
self.database.transaction_commit(trans, _("Merge Event Objects"))
self.database.emit('event-rebuild')

View File

@ -241,6 +241,7 @@ class MergeFamilies(ManagedWindow.ManagedWindow):
# TODO: rollback
else:
database.transaction_commit(trans, _('Merge family'))
self.database.emit('family-rebuild')
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
self.uistate.set_busy_cursor(False)

View File

@ -213,3 +213,4 @@ class MergeMediaQuery(object):
self.database.remove_object(old_handle, trans)
self.database.commit_media_object(self.phoenix, trans)
self.database.transaction_commit(trans, _("Merge Media Objects"))
self.database.emit('media-rebuild')

View File

@ -236,3 +236,4 @@ class MergeNoteQuery(object):
self.database.remove_note(old_handle, trans)
self.database.commit_note(self.phoenix, trans)
self.database.transaction_commit(trans, _("Merge Notes"))
self.database.emit('note-rebuild')

View File

@ -448,3 +448,4 @@ class MergePersonQuery(object):
self.database.commit_person(self.phoenix, trans)
if need_commit:
self.database.transaction_commit(trans, _('Merge Person'))
self.database.emit('person-rebuild')

View File

@ -229,3 +229,4 @@ class MergePlaceQuery(object):
self.database.remove_place(old_handle, trans)
self.database.commit_place(self.phoenix, trans)
self.database.transaction_commit(trans, _("Merge Places"))
self.database.emit('place-rebuild')

View File

@ -179,3 +179,4 @@ class MergeRepoQuery(object):
self.database.remove_repository(old_handle, trans)
self.database.commit_repository(self.phoenix, trans)
self.database.transaction_commit(trans, _("Merge Repositories"))
self.database.emit('repository-rebuild')

View File

@ -236,3 +236,4 @@ class MergeSourceQuery(object):
self.database.remove_source(old_handle, trans)
self.database.commit_source(self.phoenix, trans)
self.database.transaction_commit(trans, _("Merge Sources"))
self.database.emit('source-rebuild')

View File

@ -735,8 +735,19 @@ class ListView(NavigationView):
"""
self.dirty = True
if self.active:
# Save the currently selected handles, if any:
selected_ids = self.selected_handles()
self.bookmarks.redraw()
self.build_tree()
# Reselect one, if it still exists after rebuild:
nav_type = self.navigation_type()
lookup_handle = self.dbstate.db.get_table_metadata(nav_type)['handle_func']
for handle in selected_ids:
# Still exist?
if lookup_handle(handle):
# Select it, and stop selecting:
self.change_active(handle)
break
def _button_press(self, obj, event):
"""