mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Move the "Changes on Printer" dialog to JediWifiPrinting
...to have full control over the terminology CURA-2116
This commit is contained in:
parent
b2143e7d43
commit
063faf1520
2 changed files with 14 additions and 14 deletions
|
@ -115,7 +115,7 @@ class MachineManager(QObject):
|
|||
if matching_extruder and matching_extruder.findContainer({"type": "variant"}).getName() != hotend_id:
|
||||
# Save the material that needs to be changed. Multiple changes will be handled by the callback.
|
||||
self._auto_hotends_changed[str(index)] = containers[0].getId()
|
||||
self._materialHotendChangedMessage(self._materialHotendChangedCallback)
|
||||
self._printer_output_devices[0].materialHotendChangedMessage(self._materialHotendChangedCallback)
|
||||
else:
|
||||
Logger.log("w", "No variant found for printer definition %s with id %s" % (self._global_container_stack.getBottom().getId(), hotend_id))
|
||||
|
||||
|
@ -155,20 +155,10 @@ class MachineManager(QObject):
|
|||
if matching_extruder and matching_extruder.findContainer({"type":"material"}).getMetaDataEntry("GUID") != material_id:
|
||||
# Save the material that needs to be changed. Multiple changes will be handled by the callback.
|
||||
self._auto_materials_changed[str(index)] = containers[0].getId()
|
||||
self._materialHotendChangedMessage(self._materialHotendChangedCallback)
|
||||
self._printer_output_devices[0].materialHotendChangedMessage(self._materialHotendChangedCallback)
|
||||
else:
|
||||
Logger.log("w", "No material definition found for printer definition %s and GUID %s" % (definition_id, material_id))
|
||||
|
||||
def _materialHotendChangedMessage(self, callback):
|
||||
Application.getInstance().messageBox(catalog.i18nc("@window:title", "Changes on the Printer"),
|
||||
catalog.i18nc("@label",
|
||||
"Do you want to change the materials and hotends to match your printer?"),
|
||||
catalog.i18nc("@label",
|
||||
"The materials and / or hotends on your printer were changed. For best results always slice for the materials and hotends that are inserted in your printer."),
|
||||
buttons=QMessageBox.Yes + QMessageBox.No,
|
||||
icon=QMessageBox.Question,
|
||||
callback=callback)
|
||||
|
||||
def _materialHotendChangedCallback(self, button):
|
||||
if button == QMessageBox.No:
|
||||
self._auto_materials_changed = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue