Workaround for #6814
This commit is contained in:
parent
038459b083
commit
e2475c9576
@ -33,7 +33,7 @@ void ConfigManipulation::toggle_field(const std::string& opt_key, const bool tog
|
||||
cb_toggle_field(opt_key, toggle, opt_index);
|
||||
}
|
||||
|
||||
void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, const bool is_global_config)
|
||||
void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, const bool is_global_config, bool set_support_material_overhangs_queried)
|
||||
{
|
||||
// #ys_FIXME_to_delete
|
||||
//! Temporary workaround for the correct updates of the TextCtrl (like "layer_height"):
|
||||
@ -160,7 +160,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||
apply(config, &new_conf);
|
||||
}
|
||||
|
||||
static bool support_material_overhangs_queried = false;
|
||||
static bool support_material_overhangs_queried = set_support_material_overhangs_queried;
|
||||
|
||||
if (config->opt_bool("support_material")) {
|
||||
// Ask only once.
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
void toggle_field(const std::string& field_key, const bool toggle, int opt_index = -1);
|
||||
|
||||
// FFF print
|
||||
void update_print_fff_config(DynamicPrintConfig* config, const bool is_global_config = false);
|
||||
void update_print_fff_config(DynamicPrintConfig* config, const bool is_global_config = false, bool set_support_material_overhangs_queried = false);
|
||||
void toggle_print_fff_options(DynamicPrintConfig* config);
|
||||
|
||||
// SLA print
|
||||
|
@ -1735,7 +1735,16 @@ void TabPrint::update()
|
||||
|
||||
m_update_cnt++;
|
||||
|
||||
m_config_manipulation.update_print_fff_config(m_config, true);
|
||||
// see https://github.com/prusa3d/PrusaSlicer/issues/6814
|
||||
// ysFIXME: It's temporary workaround and should be clewer reworked:
|
||||
// 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");
|
||||
|
||||
m_config_manipulation.update_print_fff_config(m_config, true, is_user_and_saved_preset && support_material_overhangs_queried);
|
||||
|
||||
update_description_lines();
|
||||
Layout();
|
||||
|
Loading…
Reference in New Issue
Block a user