Fixed editing of the extruder's settings (SPE-735)

This commit is contained in:
YuSanka 2019-01-08 10:15:15 +01:00
parent cfff3832dc
commit 591d42fd76
3 changed files with 12 additions and 10 deletions

View file

@ -154,13 +154,15 @@ void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt
}
else if (config.def()->get(opt_key)->gui_flags.compare("serialized") == 0) {
std::string str = boost::any_cast<std::string>(value);
if (str.back() == ';') str.pop_back();
// Split a string to multiple strings by a semi - colon.This is the old way of storing multi - string values.
// Currently used for the post_process config value only.
std::vector<std::string> values;
boost::split(values, str, boost::is_any_of(";"));
if (values.size() == 1 && values[0] == "")
values.resize(0);//break;
std::vector<std::string> values {};
if (!str.empty()) {
if (str.back() == ';') str.pop_back();
// Split a string to multiple strings by a semi - colon.This is the old way of storing multi - string values.
// Currently used for the post_process config value only.
boost::split(values, str, boost::is_any_of(";"));
if (values.size() == 1 && values[0] == "")
values.resize(0);
}
config.option<ConfigOptionStrings>(opt_key)->values = values;
}
else{