This commit is contained in:
enricoturri1966 2021-10-25 14:47:22 +02:00
commit 7c00905ec7
4 changed files with 15 additions and 4 deletions

View file

@ -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.

View file

@ -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

View file

@ -1934,6 +1934,8 @@ void ConfigWizard::priv::load_pages()
index->go_to(former_active); // Will restore the active item/page if possible
q->Layout();
// This Refresh() is needed to avoid ugly artifacts after printer selection, when no one vendor was selected from the very beginnig
q->Refresh();
}
void ConfigWizard::priv::init_dialog_size()

View file

@ -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();