Set the ID of the profile object during import; ensure it is unique.

Contributes to CURA-1667 Profile import/export
This commit is contained in:
Simon Edwards 2016-06-15 16:27:40 +02:00
parent 38eec41162
commit d74cecd9db

View File

@ -144,6 +144,7 @@ class CuraContainerRegistry(ContainerRegistry):
new_name = self.createUniqueName("quality", "", os.path.splitext(os.path.basename(file_name))[0],
catalog.i18nc("@label", "Custom profile"))
profile.setName(new_name)
profile._id = new_name
if self._machineHasOwnQualities():
profile.setDefinition(self._activeDefinition())