From 3e3e6e6b1b93e915cce7daa8e8f2fb61e98b2cb5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 24 Oct 2016 17:39:27 +0200 Subject: [PATCH] Fix call to _configureProfile The footprint of the function changed, but the call wasn't updated, apparently. I pulled new_name up from one of the if-statements since they need to be computed for both branches now (and they are the same). Contributes to issue CURA-2785. --- cura/Settings/CuraContainerRegistry.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cura/Settings/CuraContainerRegistry.py b/cura/Settings/CuraContainerRegistry.py index 86fc5335be..41772fb912 100644 --- a/cura/Settings/CuraContainerRegistry.py +++ b/cura/Settings/CuraContainerRegistry.py @@ -169,16 +169,15 @@ class CuraContainerRegistry(ContainerRegistry): return { "status": "error", "message": catalog.i18nc("@info:status", "Failed to import profile from {0}: {1}", file_name, str(e))} if profile_or_list: # Success! name_seed = os.path.splitext(os.path.basename(file_name))[0] + new_name = self.uniqueName(name_seed) if type(profile_or_list) is not list: profile = profile_or_list - self._configureProfile(profile, name_seed) + self._configureProfile(profile, name_seed, new_name) return { "status": "ok", "message": catalog.i18nc("@info:status", "Successfully imported profile {0}", profile.getName()) } else: profile_index = -1 global_profile = None - new_name = self.uniqueName(name_seed) - for profile in profile_or_list: if profile_index >= 0: if len(machine_extruders) > profile_index: