Follow up e28a913e - Added update of visibility for "flag" button

This commit is contained in:
YuSanka 2023-06-14 10:39:28 +02:00
parent e28a913e89
commit c4de398d30

View File

@ -465,13 +465,19 @@ void Tab::OnActivate()
if (m_presets_choice->IsShown()) if (m_presets_choice->IsShown())
Refresh(); // Just refresh page, if m_presets_choice is already shown Refresh(); // Just refresh page, if m_presets_choice is already shown
else { else {
// on first OnActivate call show top sizer // From the tab creation whole top sizer is hidden to correct update of preset combobox's size
// (see https://github.com/prusa3d/PrusaSlicer/issues/10746)
// On first OnActivate call show top sizer
m_top_hsizer->ShowItems(true); m_top_hsizer->ShowItems(true);
// update visibility of action buttons // Size and layouts of all items are correct now,
// but ALL items of top sizer are visible.
// So, update visibility of each item according to the ui settings
update_btns_enabling(); update_btns_enabling();
// update visibility of active extruder m_btn_hide_incompatible_presets->Show(m_show_btn_incompatible_presets && m_type != Slic3r::Preset::TYPE_PRINTER);
if (TabFilament* tab = dynamic_cast<TabFilament*>(this)) if (TabFilament* tab = dynamic_cast<TabFilament*>(this))
tab->update_extruder_combobox(); tab->update_extruder_combobox();
Layout(); Layout();
} }
} }