mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 08:45:58 +08:00
MSW specific: Fixed disabling of filament comboboxes after load from 3mf
This commit is contained in:
parent
31fbfa56de
commit
bf6584995a
@ -983,20 +983,24 @@ Sidebar::Sidebar(Plater *parent)
|
|||||||
|
|
||||||
Sidebar::~Sidebar() {}
|
Sidebar::~Sidebar() {}
|
||||||
|
|
||||||
void Sidebar::init_filament_combo(PlaterPresetComboBox **combo, const int extr_idx) {
|
void Sidebar::init_filament_combo(PlaterPresetComboBox** combo, const int extr_idx)
|
||||||
|
{
|
||||||
*combo = new PlaterPresetComboBox(p->presets_panel, Slic3r::Preset::TYPE_FILAMENT);
|
*combo = new PlaterPresetComboBox(p->presets_panel, Slic3r::Preset::TYPE_FILAMENT);
|
||||||
// # copy icons from first choice
|
|
||||||
// $choice->SetItemBitmap($_, $choices->[0]->GetItemBitmap($_)) for 0..$#presets;
|
|
||||||
|
|
||||||
(*combo)->set_extruder_idx(extr_idx);
|
(*combo)->set_extruder_idx(extr_idx);
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
// When project is loading and progress dialog is processing
|
||||||
|
// In this case mainframe is marked as a disabled, that is why new created filament preset comboboxes are disabled
|
||||||
|
if (wxWindow* mf = wxGetApp().mainframe; mf && !mf->IsThisEnabled())
|
||||||
|
mf->Enable();
|
||||||
|
#endif //__WXMSW__
|
||||||
|
|
||||||
auto combo_and_btn_sizer = new wxBoxSizer(wxHORIZONTAL);
|
auto combo_and_btn_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
combo_and_btn_sizer->Add(*combo, 1, wxEXPAND);
|
combo_and_btn_sizer->Add(*combo, 1, wxEXPAND);
|
||||||
combo_and_btn_sizer->Add((*combo)->edit_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT,
|
combo_and_btn_sizer->Add((*combo)->edit_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT,
|
||||||
int(0.3*wxGetApp().em_unit()));
|
int(0.3*wxGetApp().em_unit()));
|
||||||
|
|
||||||
auto /***/sizer_filaments = this->p->sizer_filaments;
|
this->p->sizer_filaments->Add(combo_and_btn_sizer, 1, wxEXPAND |
|
||||||
sizer_filaments->Add(combo_and_btn_sizer, 1, wxEXPAND |
|
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
wxRIGHT, int(0.5 * wxGetApp().em_unit()));
|
wxRIGHT, int(0.5 * wxGetApp().em_unit()));
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user