Convert usage of PathStop to Path.Op.Gui.Stop

This commit is contained in:
Markus Lampert
2022-09-15 19:51:17 -07:00
parent 8448b69cf3
commit 83177edcbf
2 changed files with 4 additions and 4 deletions

View File

@@ -819,7 +819,7 @@ class CommandPathSanity:
fname = obj.PostProcessorOutputFile
data["outputfilename"] = os.path.splitext(os.path.basename(fname))[0]
for op in obj.Operations.Group:
if isinstance(op.Proxy, PathScripts.PathStop.Stop) and op.Stop is True:
if isinstance(op.Proxy, Path.Op.Gui.Stop.Stop) and op.Stop is True:
data["optionalstops"] = "True"
if obj.LastPostProcessOutput == "":

View File

@@ -124,16 +124,16 @@ class CommandPathStop:
FreeCAD.ActiveDocument.openTransaction(
"Add Optional or Mandatory Stop to the program"
)
FreeCADGui.addModule("PathScripts.PathStop")
FreeCADGui.addModule("Path.Op.Gui.Stop")
snippet = """
import Path
import PathScripts
from PathScripts import PathUtils
prjexists = False
obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython","Stop")
PathScripts.PathStop.Stop(obj)
Path.Op.Gui.Stop.Stop(obj)
PathScripts.PathStop._ViewProviderStop(obj.ViewObject)
Path.Op.Gui.Stop._ViewProviderStop(obj.ViewObject)
PathUtils.addToJob(obj)
"""
FreeCADGui.doCommand(snippet)