mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 01:37:51 -06:00
Update configuration mismatch dialog layout and wording
Also return to settings tab when not continuing with the print CURA-2285
This commit is contained in:
parent
65a2cedf9c
commit
9bd4d3c0a8
1 changed files with 14 additions and 10 deletions
|
@ -443,24 +443,32 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
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:
|
if warnings:
|
||||||
text = i18n_catalog.i18nc("@label", "A number of configurations are mismatched. Are you sure you wish to print with the selected configuration?")
|
text = i18n_catalog.i18nc("@label", "Are you sure you wish to print with the selected configuration?")
|
||||||
detailed_text = "<ul>"
|
informative_text = i18n_catalog.i18nc("@label", "There is a mismatch between the configuration of the printer and Cura. "
|
||||||
|
"For the best result, always slice for the PrintCores and materials that are inserted in your printer.")
|
||||||
|
detailed_text = ""
|
||||||
for warning in warnings:
|
for warning in warnings:
|
||||||
detailed_text += "<li>" + warning + "</li>"
|
detailed_text += warning + "\n"
|
||||||
|
|
||||||
detailed_text += "</ul>"
|
|
||||||
Application.getInstance().messageBox(i18n_catalog.i18nc("@window:title", "Mismatched configuration"),
|
Application.getInstance().messageBox(i18n_catalog.i18nc("@window:title", "Mismatched configuration"),
|
||||||
text,
|
text,
|
||||||
|
informative_text,
|
||||||
detailed_text,
|
detailed_text,
|
||||||
buttons=QMessageBox.Yes + QMessageBox.No,
|
buttons=QMessageBox.Yes + QMessageBox.No,
|
||||||
icon=QMessageBox.Question,
|
icon=QMessageBox.Question,
|
||||||
callback=self._configurationCallback
|
callback=self._configurationMismatchMessageCallback
|
||||||
)
|
)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
self.startPrint()
|
self.startPrint()
|
||||||
|
|
||||||
|
def _configurationMismatchMessageCallback(self, button):
|
||||||
|
if button == QMessageBox.Yes:
|
||||||
|
self.startPrint()
|
||||||
|
else:
|
||||||
|
Application.getInstance().showPrintMonitor.emit(False)
|
||||||
|
|
||||||
def isConnected(self):
|
def isConnected(self):
|
||||||
return self._connection_state != ConnectionState.closed and self._connection_state != ConnectionState.error
|
return self._connection_state != ConnectionState.closed and self._connection_state != ConnectionState.error
|
||||||
|
|
||||||
|
@ -788,7 +796,3 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
icon=QMessageBox.Question,
|
icon=QMessageBox.Question,
|
||||||
callback=callback
|
callback=callback
|
||||||
)
|
)
|
||||||
|
|
||||||
def _configurationCallback(self, button):
|
|
||||||
if button == QMessageBox.Yes:
|
|
||||||
self.startPrint()
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue