mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 13:17:51 -06:00
Get how we name variants from the machine definition
CURA-2116
This commit is contained in:
parent
6bcea1e309
commit
8c63216fdf
2 changed files with 27 additions and 2 deletions
|
@ -731,6 +731,16 @@ class MachineManager(QObject):
|
|||
|
||||
return ""
|
||||
|
||||
## Gets how the active definition calls variants
|
||||
# Caveat: per-definition-variant-title is currently not translated (though the fallback is)
|
||||
@pyqtProperty(str, notify = globalContainerChanged)
|
||||
def activeDefinitionVariantsName(self):
|
||||
fallback_title = catalog.i18nc("@label", "Nozzle")
|
||||
if self._global_container_stack:
|
||||
return self._global_container_stack.getBottom().getMetaDataEntry("variants_name", fallback_title)
|
||||
|
||||
return fallback_title
|
||||
|
||||
@pyqtSlot(str, str)
|
||||
def renameMachine(self, machine_id, new_name):
|
||||
containers = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = machine_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue