Draft: Fixed possible bug when removing trackers

This commit is contained in:
Yorik van Havre
2018-04-03 13:30:11 -03:00
parent 2a7cd1bb28
commit 85b42a16d9

View File

@@ -83,7 +83,8 @@ class Tracker:
'''remove self.switch from the scene graph. As with _insertSwitch,
must not be called during scene graph traversal).'''
sg=Draft.get3DView().getSceneGraph()
sg.removeChild(switch)
if sg.findChild(switch) >= 0:
sg.removeChild(switch)
def on(self):
self.switch.whichChild = 0