[Path] Make jobs delete cleanly.

Deletion of tool controllers now works for toolbits as well
This commit is contained in:
sliptonic
2020-06-19 13:17:17 -05:00
parent c9418a7597
commit 48b0c71c20
2 changed files with 9 additions and 4 deletions

View File

@@ -80,7 +80,7 @@ class ToolController:
def onDelete(self, obj, arg2=None):
# pylint: disable=unused-argument
if not self.usesLegacyTool(obj):
if len(obj.Tool.InList) == 1:
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)