Browse Source

Added not found handling for updateSelection

Gyedo Jeon 18 years ago
parent
commit
022b491438
1 changed files with 3 additions and 2 deletions
  1. 3 2
      direct/src/tkwidgets/SceneGraphExplorer.py

+ 3 - 2
direct/src/tkwidgets/SceneGraphExplorer.py

@@ -125,8 +125,9 @@ class SceneGraphExplorer(Pmw.MegaWidget, DirectObject):
     def updateSelection(self, searchKey):
     def updateSelection(self, searchKey):
         # [gjeon] update SGE selection with directSession
         # [gjeon] update SGE selection with directSession
         sceneGraphItem = self._node.find(searchKey)
         sceneGraphItem = self._node.find(searchKey)
-        sceneGraphItem.reveal()
-        sceneGraphItem.select()
+        if sceneGraphItem:
+            sceneGraphItem.reveal()
+            sceneGraphItem.select()
 
 
 class SceneGraphExplorerItem(TreeItem):
 class SceneGraphExplorerItem(TreeItem):