From 9bd4d3c0a8d005f0aae0fc8086046347f2738acf Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 8 Sep 2016 11:26:01 +0200 Subject: [PATCH] Update configuration mismatch dialog layout and wording Also return to settings tab when not continuing with the print CURA-2285 --- NetworkPrinterOutputDevice.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/NetworkPrinterOutputDevice.py b/NetworkPrinterOutputDevice.py index de78a03467..e6964d9715 100644 --- a/NetworkPrinterOutputDevice.py +++ b/NetworkPrinterOutputDevice.py @@ -440,27 +440,35 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): material = extruder_manager.getExtruderStack(0).findContainer({"type": "material"}) if material: if material.getMetaDataEntry("GUID") != self._json_printer_state["heads"][0]["extruders"][index]["active_material"]["GUID"]: - warnings.append(i18n_catalog.i18nc("@label", "Different material selected for extruder {0}").format(index + 1)) + warnings.append(i18n_catalog.i18nc("@label", "Different material selected for extruder {0}").format(index + 1)) if warnings: - text = i18n_catalog.i18nc("@label", "A number of configurations are mismatched. Are you sure you wish to print with the selected configuration?") - detailed_text = "" Application.getInstance().messageBox(i18n_catalog.i18nc("@window:title", "Mismatched configuration"), text, + informative_text, detailed_text, buttons=QMessageBox.Yes + QMessageBox.No, icon=QMessageBox.Question, - callback=self._configurationCallback + callback=self._configurationMismatchMessageCallback ) return self.startPrint() + def _configurationMismatchMessageCallback(self, button): + if button == QMessageBox.Yes: + self.startPrint() + else: + Application.getInstance().showPrintMonitor.emit(False) + def isConnected(self): return self._connection_state != ConnectionState.closed and self._connection_state != ConnectionState.error @@ -788,7 +796,3 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): icon=QMessageBox.Question, callback=callback ) - - def _configurationCallback(self, button): - if button == QMessageBox.Yes: - self.startPrint()