Next code refactoring: m_support_material_overhangs_queried have to be initialized from outside just once
This commit is contained in:
YuSanka 2021-10-26 16:35:51 +02:00
parent ea56f00a31
commit e5b51a654d
3 changed files with 22 additions and 12 deletions

View file

@ -1740,11 +1740,14 @@ void TabPrint::update()
// Note: This workaround works till "support_material" and "overhangs" is exclusive sets of mutually no-exclusive parameters.
// But it should be corrected when we will have more such sets.
// Disable check of the compatibility of the "support_material" and "overhangs" options for saved user profile
const Preset& selected_preset = m_preset_bundle->prints.get_selected_preset();
bool is_user_and_saved_preset = !selected_preset.is_system && !selected_preset.is_dirty;
bool support_material_overhangs_queried = m_config->opt_bool("support_material") && !m_config->opt_bool("overhangs");
if (!m_config_manipulation.is_initialized_support_material_overhangs_queried()) {
const Preset& selected_preset = m_preset_bundle->prints.get_selected_preset();
bool is_user_and_saved_preset = !selected_preset.is_system && !selected_preset.is_dirty;
bool support_material_overhangs_queried = m_config->opt_bool("support_material") && !m_config->opt_bool("overhangs");
m_config_manipulation.initialize_support_material_overhangs_queried(is_user_and_saved_preset && support_material_overhangs_queried);
}
m_config_manipulation.update_print_fff_config(m_config, true, is_user_and_saved_preset && support_material_overhangs_queried);
m_config_manipulation.update_print_fff_config(m_config, true);
update_description_lines();
Layout();