3175: Crash when undoing a family edit- part of undo being slow
svn: r14677
This commit is contained in:
parent
d34e83d9ba
commit
6802502aeb
@ -858,13 +858,16 @@ class PedigreeView(NavigationView):
|
|||||||
|
|
||||||
def person_rebuild(self, dummy=None):
|
def person_rebuild(self, dummy=None):
|
||||||
"""Callback function for signals of change database."""
|
"""Callback function for signals of change database."""
|
||||||
self.format_helper.clear_cache()
|
if self.active:
|
||||||
self.dirty = True
|
self.format_helper.clear_cache()
|
||||||
self.rebuild_trees(self.get_active())
|
self.dirty = True
|
||||||
|
self.rebuild_trees(self.get_active())
|
||||||
|
else:
|
||||||
|
self.dirty = True
|
||||||
|
|
||||||
def rebuild_trees(self, person_handle):
|
def rebuild_trees(self, person_handle):
|
||||||
"""
|
"""
|
||||||
Rebild tree with root person_handle.
|
Rebuild tree with root person_handle.
|
||||||
Called from many fuctions, when need full redraw tree.
|
Called from many fuctions, when need full redraw tree.
|
||||||
"""
|
"""
|
||||||
person = None
|
person = None
|
||||||
|
@ -211,55 +211,72 @@ class RelationshipView(NavigationView):
|
|||||||
self.redraw()
|
self.redraw()
|
||||||
|
|
||||||
def person_update(self, handle_list):
|
def person_update(self, handle_list):
|
||||||
person = self.get_active()
|
if self.active:
|
||||||
if person:
|
person = self.get_active()
|
||||||
while not self.change_person(person):
|
if person:
|
||||||
pass
|
while not self.change_person(person):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
self.change_person(None)
|
||||||
else:
|
else:
|
||||||
self.change_person(None)
|
self.dirty = True
|
||||||
|
|
||||||
def person_rebuild(self):
|
def person_rebuild(self):
|
||||||
"""Large change to person database"""
|
"""Large change to person database"""
|
||||||
if self.active:
|
if self.active:
|
||||||
self.bookmarks.redraw()
|
self.bookmarks.redraw()
|
||||||
person = self.get_active()
|
person = self.get_active()
|
||||||
if person:
|
if person:
|
||||||
while not self.change_person(person):
|
while not self.change_person(person):
|
||||||
pass
|
pass
|
||||||
|
else:
|
||||||
|
self.change_person(None)
|
||||||
else:
|
else:
|
||||||
self.change_person(None)
|
self.dirty = True
|
||||||
|
|
||||||
def family_update(self, handle_list):
|
def family_update(self, handle_list):
|
||||||
person = self.get_active()
|
if self.active:
|
||||||
if person:
|
person = self.get_active()
|
||||||
while not self.change_person(person):
|
if person:
|
||||||
pass
|
while not self.change_person(person):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
self.change_person(None)
|
||||||
else:
|
else:
|
||||||
self.change_person(None)
|
self.dirty = True
|
||||||
|
|
||||||
def family_add(self, handle_list):
|
def family_add(self, handle_list):
|
||||||
person = self.get_active()
|
if self.active:
|
||||||
if person:
|
person = self.get_active()
|
||||||
while not self.change_person(person):
|
if person:
|
||||||
pass
|
while not self.change_person(person):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
self.change_person(None)
|
||||||
else:
|
else:
|
||||||
self.change_person(None)
|
self.dirty = True
|
||||||
|
|
||||||
def family_delete(self, handle_list):
|
def family_delete(self, handle_list):
|
||||||
person = self.get_active()
|
if self.active:
|
||||||
if person:
|
person = self.get_active()
|
||||||
while not self.change_person(person):
|
if person:
|
||||||
pass
|
while not self.change_person(person):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
self.change_person(None)
|
||||||
else:
|
else:
|
||||||
self.change_person(None)
|
self.dirty = True
|
||||||
|
|
||||||
def family_rebuild(self):
|
def family_rebuild(self):
|
||||||
person = self.get_active()
|
if self.active:
|
||||||
if person:
|
person = self.get_active()
|
||||||
while not self.change_person(person):
|
if person:
|
||||||
pass
|
while not self.change_person(person):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
self.change_person(None)
|
||||||
else:
|
else:
|
||||||
self.change_person(None)
|
self.dirty = True
|
||||||
|
|
||||||
def change_page(self):
|
def change_page(self):
|
||||||
NavigationView.change_page(self)
|
NavigationView.change_page(self)
|
||||||
@ -553,6 +570,7 @@ class RelationshipView(NavigationView):
|
|||||||
self.uistate.modify_statusbar(self.dbstate)
|
self.uistate.modify_statusbar(self.dbstate)
|
||||||
|
|
||||||
self.order_action.set_sensitive(self.reorder_sensitive)
|
self.order_action.set_sensitive(self.reorder_sensitive)
|
||||||
|
self.dirty = False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user