mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Translate machine names
Some names might be changed. I know of at least one: ultimaker2plus -> ultimaker2_plus. Contributes to issue CURA-844.
This commit is contained in:
parent
7f5b656c68
commit
a87e756a42
2 changed files with 8 additions and 1 deletions
|
@ -83,7 +83,8 @@ class Profile:
|
||||||
if self._weight:
|
if self._weight:
|
||||||
config.set("general", "weight", self._weight)
|
config.set("general", "weight", self._weight)
|
||||||
if self._machine_type_id:
|
if self._machine_type_id:
|
||||||
config.set("general", "definition", self._machine_type_id)
|
translated_machine = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translatePrinters([self._machine_type_id])[0]
|
||||||
|
config.set("general", "definition", translated_machine)
|
||||||
else:
|
else:
|
||||||
config.set("general", "definition", "fdmprinter")
|
config.set("general", "definition", "fdmprinter")
|
||||||
if self._machine_variant_name:
|
if self._machine_variant_name:
|
||||||
|
|
|
@ -58,6 +58,12 @@ class VersionUpgrade21to22(VersionUpgrade):
|
||||||
return None
|
return None
|
||||||
return profile.export()
|
return profile.export()
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def translatePrinters(printers):
|
||||||
|
for index, printer in enumerate(printers):
|
||||||
|
if printer == "ultimaker2plus":
|
||||||
|
printers[index] = "ultimaker2_plus"
|
||||||
|
|
||||||
## Updates settings for the change from Cura 2.1 to 2.2.
|
## Updates settings for the change from Cura 2.1 to 2.2.
|
||||||
#
|
#
|
||||||
# The keys and values of settings are changed to what they should be in
|
# The keys and values of settings are changed to what they should be in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue