Also fix gcode output for legacy UM3 networking, switch to monitor AFTER starting transferring G-code to catch potential errors before

This commit is contained in:
ChrisTerBeke 2018-01-12 10:58:36 +01:00
parent 06f35096ad
commit d1b5744f57
2 changed files with 13 additions and 6 deletions

View file

@ -76,8 +76,6 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
self._cluster_size = int(properties.get(b"cluster_size", 0))
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
Application.getInstance().getController().setActiveStage("MonitorStage")
self.writeStarted.emit(self)
gcode_dict = getattr(Application.getInstance().getController().getScene(), "gcode_dict", [])
@ -95,6 +93,9 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
else:
self.sendPrintJob()
# Notify the UI that a switch to the print monitor should happen
Application.getInstance().getController().setActiveStage("MonitorStage")
def _spawnPrinterSelectionDialog(self):
if self._printer_selection_dialog is None:
path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "PrintWindow.qml")