Added not found handling for updateSelection

This commit is contained in:
Gyedo Jeon 2007-07-17 18:44:44 +00:00
parent ed91ab6162
commit 022b491438

View File

@ -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() if sceneGraphItem:
sceneGraphItem.select() sceneGraphItem.reveal()
sceneGraphItem.select()
class SceneGraphExplorerItem(TreeItem): class SceneGraphExplorerItem(TreeItem):