* src/DataViews/_PedigreeView.py: Work around the bug of dbstate.active not being updated when the active person was edited.
svn: r6251
This commit is contained in:
parent
c69f3b6c81
commit
8c2a5221da
@ -1,3 +1,7 @@
|
|||||||
|
2006-04-01 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
|
* src/DataViews/_PedigreeView.py: Work around the bug of
|
||||||
|
dbstate.active not being updated when the active person was edited.
|
||||||
|
|
||||||
2006-03-31 Don Allingham <don@gramps-project.org>
|
2006-03-31 Don Allingham <don@gramps-project.org>
|
||||||
* src/ManagedWindow.py: added
|
* src/ManagedWindow.py: added
|
||||||
* src/DisplayState.py: break out managed window stuff
|
* src/DisplayState.py: break out managed window stuff
|
||||||
|
@ -540,18 +540,22 @@ class PedigreeView(PageView.PersonNavView):
|
|||||||
|
|
||||||
def goto_active_person(self,handle=None):
|
def goto_active_person(self,handle=None):
|
||||||
if handle:
|
if handle:
|
||||||
person = self.db.get_person_from_handle(handle)
|
self.rebuild_trees(handle)
|
||||||
if person:
|
self.handle_history(handle)
|
||||||
self.rebuild_trees(person)
|
|
||||||
self.handle_history(person.handle)
|
|
||||||
else:
|
else:
|
||||||
self.rebuild_trees(None)
|
self.rebuild_trees(None)
|
||||||
|
|
||||||
def person_updated_cb(self,handle_list):
|
def person_updated_cb(self,handle_list):
|
||||||
self.rebuild_trees(self.dbstate.active)
|
if self.dbstate.active:
|
||||||
|
self.rebuild_trees(self.dbstate.active.handle)
|
||||||
|
else:
|
||||||
|
self.rebuild_trees(None)
|
||||||
|
|
||||||
def person_rebuild(self):
|
def person_rebuild(self):
|
||||||
self.rebuild_trees(self.dbstate.active)
|
if self.dbstate.active:
|
||||||
|
self.rebuild_trees(self.dbstate.active.handle)
|
||||||
|
else:
|
||||||
|
self.rebuild_trees(None)
|
||||||
|
|
||||||
def person_edited_cb(self, p1=None, p2=None):
|
def person_edited_cb(self, p1=None, p2=None):
|
||||||
pass
|
pass
|
||||||
@ -572,7 +576,8 @@ class PedigreeView(PageView.PersonNavView):
|
|||||||
else:
|
else:
|
||||||
self.notebook.set_current_page(self.force_size-2)
|
self.notebook.set_current_page(self.force_size-2)
|
||||||
|
|
||||||
def rebuild_trees(self,person):
|
def rebuild_trees(self,person_handle):
|
||||||
|
person = self.dbstate.db.get_person_from_handle( person_handle)
|
||||||
if self.tree_style == 1:
|
if self.tree_style == 1:
|
||||||
# format of the definition is:
|
# format of the definition is:
|
||||||
# ((each box of the pedigree has a node here),
|
# ((each box of the pedigree has a node here),
|
||||||
@ -1055,15 +1060,24 @@ class PedigreeView(PageView.PersonNavView):
|
|||||||
if data in [0,1]:
|
if data in [0,1]:
|
||||||
if self.tree_style != data:
|
if self.tree_style != data:
|
||||||
self.tree_style = data
|
self.tree_style = data
|
||||||
self.rebuild_trees(self.dbstate.active) # Rebuild using new style
|
if self.dbstate.active:
|
||||||
|
self.rebuild_trees(self.dbstate.active.handle) # Rebuild using new style
|
||||||
|
else:
|
||||||
|
self.rebuild_trees(None)
|
||||||
|
|
||||||
def change_show_images_cb(self,event):
|
def change_show_images_cb(self,event):
|
||||||
self.show_images = not self.show_images
|
self.show_images = not self.show_images
|
||||||
self.rebuild_trees(self.dbstate.active) # Rebuild using new style
|
if self.dbstate.active:
|
||||||
|
self.rebuild_trees(self.dbstate.active.handle) # Rebuild using new style
|
||||||
|
else:
|
||||||
|
self.rebuild_trees(None)
|
||||||
|
|
||||||
def change_show_marriage_cb(self,event):
|
def change_show_marriage_cb(self,event):
|
||||||
self.show_marriage_data = not self.show_marriage_data
|
self.show_marriage_data = not self.show_marriage_data
|
||||||
self.rebuild_trees(self.dbstate.active) # Rebuild using new style
|
if self.dbstate.active:
|
||||||
|
self.rebuild_trees(self.dbstate.active.handle) # Rebuild using new style
|
||||||
|
else:
|
||||||
|
self.rebuild_trees(None)
|
||||||
|
|
||||||
def find_tree(self,person,index,depth,lst,val=0):
|
def find_tree(self,person,index,depth,lst,val=0):
|
||||||
"""Recursively build a list of ancestors"""
|
"""Recursively build a list of ancestors"""
|
||||||
|
Loading…
Reference in New Issue
Block a user