mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 02:35:57 +08:00
Fix translate function
It was expected to return a list of translated names, even though it actually translates in-place. Contributes to issue CURA-844.
This commit is contained in:
parent
39212a601e
commit
86544d4172
@ -58,11 +58,16 @@ class VersionUpgrade21to22(VersionUpgrade):
|
|||||||
return None
|
return None
|
||||||
return profile.export()
|
return profile.export()
|
||||||
|
|
||||||
|
## Translates printer names that have changed since the last version.
|
||||||
|
#
|
||||||
|
# \param printers A list of printer names in the old version.
|
||||||
|
# \return The same list, but with printer names translated.
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def translatePrinters(printers):
|
def translatePrinters(printers):
|
||||||
for index, printer in enumerate(printers):
|
for index, printer in enumerate(printers):
|
||||||
if printer == "ultimaker2plus":
|
if printer == "ultimaker2plus":
|
||||||
printers[index] = "ultimaker2_plus"
|
printers[index] = "ultimaker2_plus"
|
||||||
|
return printers
|
||||||
|
|
||||||
## Updates settings for the change from Cura 2.1 to 2.2.
|
## Updates settings for the change from Cura 2.1 to 2.2.
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user