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.
This commit is contained in:
Ghostkeeper 2016-10-24 17:39:27 +02:00
parent 8ce81fec9f
commit 3e3e6e6b1b
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -169,16 +169,15 @@ class CuraContainerRegistry(ContainerRegistry):
return { "status": "error", "message": catalog.i18nc("@info:status", "Failed to import profile from <filename>{0}</filename>: <message>{1}</message>", 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: