Commit 10fea26b authored by eric pellegrini's avatar eric pellegrini
Browse files

Fixed problem with data tree

parent 0e98d3fd
...@@ -74,4 +74,4 @@ class DataController(collections.OrderedDict): ...@@ -74,4 +74,4 @@ class DataController(collections.OrderedDict):
return (weakref.getweakrefcount(collections.OrderedDict.__getitem__(self,item))!=0) return (weakref.getweakrefcount(collections.OrderedDict.__getitem__(self,item))!=0)
DATA_CONTROLLER = DataController() DATA_CONTROLLER = DataController()
\ No newline at end of file
...@@ -98,10 +98,13 @@ class DataTreePanel(wx.Panel): ...@@ -98,10 +98,13 @@ class DataTreePanel(wx.Panel):
def get_tree_item(self, node, name): def get_tree_item(self, node, name):
for item in self.get_children(node): for item in self.get_children(node):
if self._tree.GetItemData(item).GetData() == name: data = self._tree.GetItemData(item)
return item if data is not None:
else: if data.GetData() == name:
return self.get_tree_item(item, name) return item
return self.get_tree_item(item, name)
return None return None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment