Changed showMonitorStage to setActiveStage

CL-541
This commit is contained in:
Jaime van Kessel 2017-12-15 15:46:15 +01:00
parent 35d3690b89
commit bd4797404d
3 changed files with 6 additions and 6 deletions

View file

@ -77,7 +77,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
def requestWrite(self, nodes, file_name=None, filter_by_machine=False, file_handler=None, **kwargs): def requestWrite(self, nodes, file_name=None, filter_by_machine=False, file_handler=None, **kwargs):
# Notify the UI that a switch to the print monitor should happen # Notify the UI that a switch to the print monitor should happen
Application.getInstance().showPrintMonitor.emit(True) Application.getInstance().getController().setActiveStage("MonitorStage")
self.writeStarted.emit(self) self.writeStarted.emit(self)
self._gcode = getattr(Application.getInstance().getController().getScene(), "gcode_list", []) self._gcode = getattr(Application.getInstance().getController().getScene(), "gcode_list", [])
@ -160,7 +160,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
self._progress_message.hide() self._progress_message.hide()
self._compressing_gcode = False self._compressing_gcode = False
self._sending_gcode = False self._sending_gcode = False
Application.getInstance().showPrintMonitor.emit(False) Application.getInstance().getController().setActiveStage("PrepareStage")
@pyqtSlot() @pyqtSlot()
def openPrintJobControlPanel(self): def openPrintJobControlPanel(self):

View file

@ -177,7 +177,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
return return
# Notify the UI that a switch to the print monitor should happen # Notify the UI that a switch to the print monitor should happen
Application.getInstance().showPrintMonitor.emit(True) Application.getInstance().getController().setActiveStage("MonitorStage")
self.writeStarted.emit(self) self.writeStarted.emit(self)
self._gcode = getattr(Application.getInstance().getController().getScene(), "gcode_list", []) self._gcode = getattr(Application.getInstance().getController().getScene(), "gcode_list", [])
@ -265,7 +265,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
self._progress_message.hide() self._progress_message.hide()
self._compressing_gcode = False self._compressing_gcode = False
self._sending_gcode = False self._sending_gcode = False
Application.getInstance().showPrintMonitor.emit(False) Application.getInstance().getController().setActiveStage("PrepareStage")
def _onPostPrintJobFinished(self, reply): def _onPostPrintJobFinished(self, reply):
self._progress_message.hide() self._progress_message.hide()
@ -290,7 +290,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
if button == QMessageBox.Yes: if button == QMessageBox.Yes:
self._startPrint() self._startPrint()
else: else:
Application.getInstance().showPrintMonitor.emit(False) Application.getInstance().getController().setActiveStage("PrepareStage")
# For some unknown reason Cura on OSX will hang if we do the call back code # For some unknown reason Cura on OSX will hang if we do the call back code
# immediately without first returning and leaving QML's event system. # immediately without first returning and leaving QML's event system.

View file

@ -76,7 +76,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
if self._is_printing: if self._is_printing:
return # Aleady printing return # Aleady printing
Application.getInstance().showPrintMonitor.emit(True) Application.getInstance().getController().setActiveStage("MonitorStage")
gcode_list = getattr(Application.getInstance().getController().getScene(), "gcode_list") gcode_list = getattr(Application.getInstance().getController().getScene(), "gcode_list")
self._printGCode(gcode_list) self._printGCode(gcode_list)