From 2158826e06f7fc4ef640f98db5c75e1def673049 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 29 Mar 2017 13:46:36 +0200 Subject: [PATCH] Change backend state to disabled after reading a gcode CURA-3604 --- plugins/GCodeReader/GCodeReader.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/GCodeReader/GCodeReader.py b/plugins/GCodeReader/GCodeReader.py index 1f02998cb3..8a9e506fef 100755 --- a/plugins/GCodeReader/GCodeReader.py +++ b/plugins/GCodeReader/GCodeReader.py @@ -2,6 +2,7 @@ # Cura is released under the terms of the AGPLv3 or higher. from UM.Application import Application +from UM.Backend import Backend from UM.Job import Job from UM.Logger import Logger from UM.Math.AxisAlignedBox import AxisAlignedBox @@ -356,4 +357,8 @@ class GCodeReader(MeshReader): "Make sure the g-code is suitable for your printer and printer configuration before sending the file to it. The g-code representation may not be accurate."), lifetime=0) caution_message.show() + # The "save/print" button's state is bound to the backend state. + backend = Application.getInstance().getBackend() + backend.backendStateChange.emit(Backend.BackendState.Disabled) + return scene_node