Added full unit test to make sure tool chain works correctly.
This commit is contained in:
@@ -376,13 +376,14 @@ def findToolController(obj, name=None):
|
||||
|
||||
PathLog.track('name: {}'.format(name))
|
||||
c = None
|
||||
# First check if a user has selected a tool controller in the tree. Return the first one and remove all from selection
|
||||
for sel in FreeCADGui.Selection.getSelectionEx():
|
||||
if hasattr(sel.Object, 'Proxy'):
|
||||
if isinstance(sel.Object.Proxy, PathScripts.PathToolController.ToolController):
|
||||
if c is None:
|
||||
c = sel.Object
|
||||
FreeCADGui.Selection.removeSelection(sel.Object)
|
||||
if FreeCAD.GuiUp:
|
||||
# First check if a user has selected a tool controller in the tree. Return the first one and remove all from selection
|
||||
for sel in FreeCADGui.Selection.getSelectionEx():
|
||||
if hasattr(sel.Object, 'Proxy'):
|
||||
if isinstance(sel.Object.Proxy, PathScripts.PathToolController.ToolController):
|
||||
if c is None:
|
||||
c = sel.Object
|
||||
FreeCADGui.Selection.removeSelection(sel.Object)
|
||||
if c is not None:
|
||||
return c
|
||||
|
||||
|
||||
Reference in New Issue
Block a user