mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
CURA-4870 Check wether the current configuration matches one of the unique configurations available on the printer output device.
Improve some elements in the UI
This commit is contained in:
parent
f779a20a6e
commit
a992487589
5 changed files with 46 additions and 12 deletions
|
@ -180,15 +180,18 @@ class MachineManager(QObject):
|
|||
extruder_configurations = []
|
||||
for extruder in self._global_container_stack.extruders.values():
|
||||
extruder_configurations.append({
|
||||
"position": len(extruder_configurations),
|
||||
"position": int(extruder.getMetaDataEntry("position")),
|
||||
"material": extruder.material.getName() if extruder.material != self._empty_material_container else None,
|
||||
"hotendID": extruder.variant.getName() if extruder.variant != self._empty_variant_container else None
|
||||
})
|
||||
self._current_printer_configuration.extruderConfigurations = extruder_configurations
|
||||
self._current_printer_configuration.buildplateConfiguration = self._global_container_stack.variant.getName() if self._global_container_stack.variant is not None else None
|
||||
print(self._current_printer_configuration.extruderConfigurations)
|
||||
self._current_printer_configuration.buildplateConfiguration = self._global_container_stack.variant.getName() if self._global_container_stack.variant != self._empty_variant_container else None
|
||||
self.currentConfigurationChanged.emit()
|
||||
|
||||
@pyqtSlot(QObject, result = bool)
|
||||
def matchesConfiguration(self, configuration: ConfigurationModel) -> bool:
|
||||
return self._current_printer_configuration == configuration
|
||||
|
||||
@property
|
||||
def newVariant(self):
|
||||
return self._new_variant_container
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue