mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix renaming profiles from the Profiles page
CURA-1585
This commit is contained in:
parent
35706734e6
commit
05643eca11
2 changed files with 16 additions and 7 deletions
|
@ -312,6 +312,15 @@ class MachineManagerModel(QObject):
|
|||
return ""
|
||||
|
||||
|
||||
@pyqtSlot(str, str)
|
||||
def renameQualityContainer(self, container_id, new_name):
|
||||
containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = container_id, type = "quality")
|
||||
if containers:
|
||||
new_name = self._createUniqueName("machine", new_name, catalog.i18nc("@label", "Custom profile"))
|
||||
containers[0].setName(new_name)
|
||||
UM.Settings.ContainerRegistry.getInstance().containerChanged.emit(containers[0])
|
||||
|
||||
|
||||
@pyqtSlot(str)
|
||||
def removeQualityContainer(self, container_id):
|
||||
containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = container_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue