Skip to content

Commit

Permalink
bug: on deleting tool controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptonic committed Nov 16, 2020
1 parent 138a395 commit 26eac12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/Mod/Path/PathScripts/PathOpGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,10 @@ def selectInComboBox(self, name, combo):
combo.blockSignals(False)

def resetToolController(self, job, tc):
self.obj.ToolController = tc
combo = self.form.toolController
self.setupToolController(self.obj, combo)
if self.obj is not None:
self.obj.ToolController = tc
combo = self.form.toolController
self.setupToolController(self.obj, combo)

def setupToolController(self, obj, combo):
'''setupToolController(obj, combo) ...
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Path/PathScripts/PathToolController.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def onDelete(self, obj, arg2=None):
if hasattr(obj.Tool, 'InList') and len(obj.Tool.InList) == 1:
if hasattr(obj.Tool.Proxy, 'onDelete'):
obj.Tool.Proxy.onDelete(obj.Tool)
obj.Document.removeObject(obj.Tool.Name)
#obj.Document.removeObject(obj.Name)

def setFromTemplate(self, obj, template):
'''
Expand Down

0 comments on commit 26eac12

Please sign in to comment.