diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 97cf05f52..b0944d627 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2006-11-17 Don Allingham + * src/ManagedWindow.py: catch missing item error + 2006-11-16 Don Allingham * src/DataViews/_RelationView.py: share parents button * src/images/share-fam.png: share parents button diff --git a/gramps2/src/ManagedWindow.py b/gramps2/src/ManagedWindow.py index babd159ad..d2b1bc44c 100644 --- a/gramps2/src/ManagedWindow.py +++ b/gramps2/src/ManagedWindow.py @@ -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