mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-30 23:48:44 +03:00
reset exclude_area
This commit is contained in:
@@ -618,7 +618,11 @@ void ConfigOptionsGroup::back_to_sys_value(const std::string& opt_key)
|
||||
void ConfigOptionsGroup::back_to_config_value(const DynamicPrintConfig& config, const std::string& opt_key)
|
||||
{
|
||||
boost::any value;
|
||||
//B52
|
||||
if (opt_key == "bed_shape") {
|
||||
value = get_config_value(config, "bed_exclude_area");
|
||||
this->change_opt_value("bed_exclude_area", value);
|
||||
OptionsGroup::on_change_OG("bed_exclude_area", value);
|
||||
for (const std::string& key : {"bed_custom_texture", "bed_custom_model"}) {
|
||||
value = config.opt_string(key);
|
||||
this->change_opt_value(key, value);
|
||||
|
||||
@@ -629,8 +629,9 @@ void Tab::update_changed_ui()
|
||||
{
|
||||
auto check_bed_custom_options = [](std::vector<std::string>& keys) {
|
||||
size_t old_keys_size = keys.size();
|
||||
//B52
|
||||
keys.erase(std::remove_if(keys.begin(), keys.end(), [](const std::string& key) {
|
||||
return key == "bed_custom_texture" || key == "bed_custom_model"; }), keys.end());
|
||||
return key == "bed_custom_texture" || key == "bed_custom_model" || key == "bed_exclude_area"; }), keys.end());
|
||||
if (old_keys_size != keys.size() && std::find(keys.begin(), keys.end(), "bed_shape") == keys.end())
|
||||
keys.emplace_back("bed_shape");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user