FIX: exception when comparing profiles
jira:[NEW] Signed-off-by: XunZhangBambu <xun.zhang@bambulab.com> Change-Id: I946b5fcd35f779d271df2b3de731fdcada5aab29
This commit is contained in:
parent
499106aafa
commit
1fa6a08cc7
|
@ -2599,6 +2599,12 @@ void add_correct_opts_to_diff(const std::string &opt_key, t_config_option_keys&
|
|||
const T* opt_init = static_cast<const T*>(other.option(opt_key));
|
||||
const T* opt_cur = static_cast<const T*>(this_c.option(opt_key));
|
||||
int opt_init_max_id = opt_init->values.size() - 1;
|
||||
if (opt_init_max_id < 0) {
|
||||
for (int i = 0; i < int(opt_cur->values.size()); i++)
|
||||
vec.emplace_back(opt_key + "#" + std::to_string(i));
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < int(opt_cur->values.size()); i++)
|
||||
{
|
||||
int init_id = i <= opt_init_max_id ? i : 0;
|
||||
|
|
|
@ -1366,6 +1366,9 @@ static wxString get_string_value(std::string opt_key, const DynamicPrintConfig&
|
|||
else if (opt_key == "thumbnail_size") {
|
||||
return get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
|
||||
}
|
||||
else if (opt_key == "head_wrap_detect_zone") {
|
||||
return get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
|
||||
}
|
||||
Vec2d val = config.opt<ConfigOptionPoints>(opt_key)->get_at(opt_idx);
|
||||
return from_u8((boost::format("[%1%]") % ConfigOptionPoint(val).serialize()).str());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue