add UndoValueUIManager from PS

from prusa3d/PrusaSlicer@32ff20d

Co-authored-by: YuSanka <yusanka@gmail.com>
This commit is contained in:
Ocraftyone 2023-12-20 00:29:06 -05:00
parent 7739252711
commit 4f0a47b7f4
No known key found for this signature in database
GPG key ID: 85836ED21AD4D125
7 changed files with 162 additions and 88 deletions

View file

@ -210,7 +210,7 @@ void OptionsGroup::append_line(const Line& line)
m_options_mode.push_back(option_set[0].opt.mode);
}
//BBS: get line for opt_key
/*//BBS: get line for opt_key
Line* OptionsGroup::get_line(const std::string& opt_key)
{
for (auto& l : m_lines)
@ -222,7 +222,7 @@ Line* OptionsGroup::get_line(const std::string& opt_key)
}
return nullptr;
}
}*/
void OptionsGroup::append_separator()
{
@ -678,6 +678,7 @@ void ConfigOptionsGroup::back_to_config_value(const DynamicPrintConfig& config,
opt_key == "thumbnails" || opt_key == "bed_custom_texture" || opt_key == "bed_custom_model") {
value = get_config_value(config, opt_key);
this->change_opt_value(opt_key, value);
OptionsGroup::on_change_OG(opt_key, value);
return;
} else {
auto opt_id = m_opt_map.find(opt_key)->first;