CAM: Made Fanuc post processor compatible with FreeCAD 1.1.
Use setPlainText() if available, otherwise use setText(). Workaround for a regression from #23862.
This commit is contained in:
@@ -352,7 +352,13 @@ def export(objectslist, filename, argstring):
|
||||
|
||||
if FreeCAD.GuiUp and SHOW_EDITOR:
|
||||
dia = PostUtils.GCodeEditorDialog()
|
||||
dia.editor.setPlainText(gcode)
|
||||
|
||||
# Workaround for 1.1 while we wait for
|
||||
# https://github.com/FreeCAD/FreeCAD/pull/26008 to be merged.
|
||||
if hasattr(dia.editor, "setPlainText"):
|
||||
dia.editor.setPlainText(gcode)
|
||||
else:
|
||||
dia.editor.setText(gcode)
|
||||
result = dia.exec_()
|
||||
if result:
|
||||
final = dia.editor.toPlainText()
|
||||
|
||||
Reference in New Issue
Block a user