From e2e9e7964c2bbfb1274df5f017350746fc7385e2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 10 Jun 2016 11:48:33 +0200 Subject: [PATCH] Fixed duplication if no name was changed CURA-1427 --- cura/MachineManagerModel.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 443c19d302..0e7230fb79 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -304,6 +304,10 @@ class MachineManagerModel(QObject): new_name = self._createUniqueName("quality", containers[0].getName(), new_name, 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 # 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.