Fix upgrading custom FDM printers from 2.5

CURA-4188

Custom FDM printers in 2.5 don't have multi-extrusion support but they
do since 2.6. Upgrading from 2.5 to 2.6 will not create the missing
extruder stacks for the old custom FDM printers, which causes a crash.
This fix makes sure that all custom FDM printers will have 8 extruder
stacks during the upgrade so that Cura can still start normally and
those printers will still be usable.
This commit is contained in:
Lipu Fei 2017-08-18 12:56:20 +02:00
parent 9a00c07c3d
commit 67cfb064e6
3 changed files with 158 additions and 1 deletions

View file

@ -12,7 +12,7 @@ def getMetaData():
return {
"version_upgrade": {
# From To Upgrade function
("machine_stack", 3000000): ("machine_stack", 3000002, upgrade.upgradeStack),
("machine_stack", 3000001): ("machine_stack", 3000002, upgrade.upgradeStack),
("extruder_train", 3000000): ("extruder_train", 3000002, upgrade.upgradeStack),
# In 2.6.x, Preferences are saved with "version = 4" and no setting_version.