Skip to content

Commit

Permalink
Fixed loading of TC from template
Browse files Browse the repository at this point in the history
  • Loading branch information
mlampert committed Jan 27, 2021
1 parent be4d90a commit e807e1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Mod/Path/PathScripts/PathToolController.py
Expand Up @@ -250,7 +250,8 @@ def Create(name='TC: Default Tool', tool=None, toolNumber=1, assignViewProvider=
if tool.ViewObject:
tool.ViewObject.Visibility = False

obj.Tool = tool
if tool:
obj.Tool = tool
obj.ToolNumber = toolNumber
return obj

Expand All @@ -260,7 +261,7 @@ def FromTemplate(template, assignViewProvider=True):
PathLog.track()

name = template.get(ToolControllerTemplate.Name, ToolControllerTemplate.Label)
obj = Create(name, assignViewProvider=True)
obj = Create(name, tool=False, assignViewProvider=True)
obj.Proxy.setFromTemplate(obj, template)

return obj
Expand Down

0 comments on commit e807e1d

Please sign in to comment.