mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
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:
parent
8ce81fec9f
commit
3e3e6e6b1b
1 changed files with 2 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue