FIX: crach when send print and reslice
JIRA: STUDIO-5774 Signed-off-by: Kunlong Ma <kunlong.ma@bambulab.com> Change-Id: I56be025b822f06c4a5d0a24ee696eebf51d7ec1e
This commit is contained in:
parent
ee583ee964
commit
0abc30ebe2
|
@ -8182,14 +8182,19 @@ void Plater::priv::record_start_print_preset(std::string action) {
|
||||||
if (full_config.has("different_settings_to_system")) {
|
if (full_config.has("different_settings_to_system")) {
|
||||||
std::vector<std::string> different_values = full_config.option<ConfigOptionStrings>("different_settings_to_system")->values;
|
std::vector<std::string> different_values = full_config.option<ConfigOptionStrings>("different_settings_to_system")->values;
|
||||||
std::vector<std::string> values;
|
std::vector<std::string> values;
|
||||||
boost::split(values, different_values.front(), boost::is_any_of(";"));
|
for (int i = 0; i < different_values.size(); ++i) {
|
||||||
for (int i = 0; i < values.size(); ++i) {
|
if (different_values[i] == "")
|
||||||
std::string str = values[i];
|
continue;
|
||||||
|
boost::split(values, different_values[i], boost::is_any_of(";"));
|
||||||
|
for (int k = 0; k < values.size(); ++k) {
|
||||||
|
std::string str = values[k];
|
||||||
const ConfigOption* config = full_config.option(str);
|
const ConfigOption* config = full_config.option(str);
|
||||||
|
if (config)
|
||||||
j_system[str] = config->serialize();
|
j_system[str] = config->serialize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
j["global_diff"] = j_system;
|
j["global_diff"] = j_system;
|
||||||
|
|
||||||
PartPlate* curr_plate = partplate_list.get_curr_plate();
|
PartPlate* curr_plate = partplate_list.get_curr_plate();
|
||||||
|
@ -11436,7 +11441,7 @@ void Plater::record_slice_preset(std::string action)
|
||||||
NetworkAgent* agent = wxGetApp().getAgent();
|
NetworkAgent* agent = wxGetApp().getAgent();
|
||||||
if (agent) {
|
if (agent) {
|
||||||
agent->track_event("slice_completed", j.dump());
|
agent->track_event("slice_completed", j.dump());
|
||||||
agent->track_update_property("different_settings_to_system", j["different_set_to_system"]);
|
agent->track_update_property("different_settings_to_system", j["different_settings_to_system"].dump());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
|
Loading…
Reference in New Issue