Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2019-01-08 12:15:15 +0300
committerYuSanka <yusanka@gmail.com>2019-01-08 12:18:21 +0300
commit591d42fd762d9d22e6b139d8fc043b60949e43c2 (patch)
tree3a9a524048b03588a4f9103bb074862ef949e457 /src/slic3r/GUI/GUI.cpp
parentcfff3832dc8982cc8e4964694faeb228c86b8a03 (diff)
Fixed editing of the extruder's settings (SPE-735)
Diffstat (limited to 'src/slic3r/GUI/GUI.cpp')
-rw-r--r--src/slic3r/GUI/GUI.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp
index df5c1d407..0a27af9fa 100644
--- a/src/slic3r/GUI/GUI.cpp
+++ b/src/slic3r/GUI/GUI.cpp
@@ -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{