FIX: add support type normal and tree in handle_legacy

If don't do this, laoding old 3mf generated by version 1.3 or lower will
have problem, e.g. normal support will be replaced with normal(auto).

Change-Id: Iaa8e1f8badaacc74479d99a6e4153d8850945279
This commit is contained in:
Arthur 2022-12-15 15:59:50 +08:00 committed by Lane.Wei
parent efc761d794
commit a7ff17d99c

View file

@ -3812,6 +3812,10 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
// old file "0" is None, "2" is Traditional
// new file "0" is Traditional, erase "2"
value = "0";
} else if (opt_key == "support_type" && value == "normal") {
value = "normal(manual)";
} else if (opt_key == "support_type" && value == "tree") {
value = "tree(manual)";
} else if (opt_key == "different_settings_to_system") {
std::string copy_value = value;
copy_value.erase(std::remove(copy_value.begin(), copy_value.end(), '\"'), copy_value.end()); // remove '"' in string