2006-11-17 Don Allingham <don@gramps-project.org>
* src/ManagedWindow.py: catch missing item error svn: r7642
This commit is contained in:
parent
50019b38de
commit
5afb3c0e29
@ -1,3 +1,6 @@
|
||||
2006-11-17 Don Allingham <don@gramps-project.org>
|
||||
* src/ManagedWindow.py: catch missing item error
|
||||
|
||||
2006-11-16 Don Allingham <don@gramps-project.org>
|
||||
* src/DataViews/_RelationView.py: share parents button
|
||||
* src/images/share-fam.png: share parents button
|
||||
|
@ -118,11 +118,14 @@ class GrampsWindowManager:
|
||||
def close_track(self,track):
|
||||
# This is called when item needs to be closed
|
||||
# Closes all its children and then removes the item from the tree.
|
||||
item = self.get_item_from_track(track)
|
||||
self.recursive_action(item,self.close_item)
|
||||
# This only needs to be run once for the highest level point
|
||||
# to remove.
|
||||
self.remove_item(track)
|
||||
try:
|
||||
item = self.get_item_from_track(track)
|
||||
self.recursive_action(item,self.close_item)
|
||||
# This only needs to be run once for the highest level point
|
||||
# to remove.
|
||||
self.remove_item(track)
|
||||
except IndexError:
|
||||
print "Missing item from window manager", track, self.close_item
|
||||
|
||||
def recursive_action(self,item,func,*args):
|
||||
# This function recursively calls itself over the child items
|
||||
|
Loading…
Reference in New Issue
Block a user