Operations and ToolControllers have labels set automatically.
This will hopefully make things a little clearer A couple more Sanity checks. Don't error if no TC in project.
This commit is contained in:
@@ -404,10 +404,13 @@ def getLastToolLoad(obj):
|
||||
|
||||
if tc is None:
|
||||
for g in FreeCAD.ActiveDocument.Objects: # top level object
|
||||
if isinstance(g.Proxy, PathScripts.PathLoadTool.LoadTool):
|
||||
lastfound = g
|
||||
if g == obj:
|
||||
tc = lastfound
|
||||
try:
|
||||
if isinstance(g.Proxy, PathScripts.PathLoadTool.LoadTool):
|
||||
lastfound = g
|
||||
if g == obj:
|
||||
tc = lastfound
|
||||
except:
|
||||
continue
|
||||
return tc
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user