mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Move translateVariant to VersionUpgrade21to22
Also make it a dictionary look-up, like the rest, instead of a series of if-statements. Contributes to issue CURA-844.
This commit is contained in:
parent
439629d0b5
commit
93041191c2
2 changed files with 31 additions and 25 deletions
|
@ -70,30 +70,7 @@ class MachineInstance:
|
|||
type_name = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translatePrinter(self._type_name)
|
||||
active_profile = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateProfile(self._active_profile_name)
|
||||
active_material = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateProfile(self._active_material_name)
|
||||
if type_name == "ultimaker2_plus":
|
||||
if self._variant_name == "0.25 mm":
|
||||
variant = "ultimaker2_plus_0.25"
|
||||
elif self._variant_name == "0.4 mm":
|
||||
variant = "ultimaker2_plus_0.4"
|
||||
elif self._variant_name == "0.6 mm":
|
||||
variant = "ultimaker2_plus_0.6"
|
||||
elif self._variant_name == "0.8 mm":
|
||||
variant = "ultimaker2_plus_0.8"
|
||||
else:
|
||||
variant = self._variant_name
|
||||
elif type_name == "ultimaker2_extended_plus":
|
||||
if self._variant_name == "0.25 mm":
|
||||
variant = "ultimaker2_extended_plus_0.25"
|
||||
elif self._variant_name == "0.4 mm":
|
||||
variant = "ultimaker2_extended_plus_0.4"
|
||||
elif self._variant_name == "0.6 mm":
|
||||
variant = "ultimaker2_extended_plus_0.6"
|
||||
elif self._variant_name == "0.8 mm":
|
||||
variant = "ultimaker2_extended_plus_0.8"
|
||||
else:
|
||||
variant = self._variant_name
|
||||
else:
|
||||
variant = self._variant_name
|
||||
variant = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateVariant(self._variant_name, type_name)
|
||||
|
||||
containers = [
|
||||
self._name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue