mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Fixed duplication if no name was changed
CURA-1427
This commit is contained in:
parent
1aa11593fa
commit
e2e9e7964c
1 changed files with 4 additions and 0 deletions
|
@ -304,6 +304,10 @@ class MachineManagerModel(QObject):
|
||||||
new_name = self._createUniqueName("quality", containers[0].getName(), new_name,
|
new_name = self._createUniqueName("quality", containers[0].getName(), new_name,
|
||||||
catalog.i18nc("@label", "Custom profile"))
|
catalog.i18nc("@label", "Custom profile"))
|
||||||
|
|
||||||
|
if containers[0].getName() == new_name:
|
||||||
|
# Nothing to do.
|
||||||
|
return
|
||||||
|
|
||||||
# As we also want the id of the container to be changed (so that profile name is the name of the file
|
# As we also want the id of the container to be changed (so that profile name is the name of the file
|
||||||
# on disk. We need to create a new instance and remove it (so the old file of the container is removed)
|
# on disk. We need to create a new instance and remove it (so the old file of the container is removed)
|
||||||
# If we don't do that, we might get duplicates & other weird issues.
|
# If we don't do that, we might get duplicates & other weird issues.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue