diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index cf4f068427..c999d1ee91 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -1470,7 +1470,7 @@ PageCustom::PageCustom(ConfigWizard *parent) auto *label = new wxStaticText(this, wxID_ANY, _L("Custom profile name:")); wxBoxSizer* profile_name_sizer = new wxBoxSizer(wxVERTICAL); - profile_name_editor = new SavePresetDialog::Item{ this, profile_name_sizer, default_profile_name }; + profile_name_editor = new SavePresetDialog::Item{ this, profile_name_sizer, default_profile_name, &wxGetApp().preset_bundle->printers}; profile_name_editor->Enable(false); cb_custom->Bind(wxEVT_CHECKBOX, [this](wxCommandEvent &) { @@ -3796,13 +3796,20 @@ void ConfigWizard::priv::load_pages_from_archive() check_and_install_missing_materials(T_ANY); update_materials(T_ANY); - - if (!page_filaments && !only_sla_mode) { + if (page_filaments) { + if (any_fff_selected) + page_filaments->reload_presets(); + } + else if(!only_sla_mode) { add_page(page_filaments = new PageMaterials(q, &filaments, _L("Filament Profiles Selection"), _L("Filaments"), _L("Type:"))); } - if (!page_sla_materials) { + if (page_sla_materials) { + if (any_sla_selected) + page_sla_materials->reload_presets(); + } + else { add_page(page_sla_materials = new PageMaterials(q, &sla_materials, _L("SLA Material Profiles Selection") + " ", _L("SLA Materials"), _L("Type:"))); } diff --git a/src/slic3r/GUI/SavePresetDialog.cpp b/src/slic3r/GUI/SavePresetDialog.cpp index c915c5c170..c98cd97768 100644 --- a/src/slic3r/GUI/SavePresetDialog.cpp +++ b/src/slic3r/GUI/SavePresetDialog.cpp @@ -139,8 +139,9 @@ SavePresetDialog::Item::Item(Preset::Type type, const std::string& suffix, wxBox update(); } -SavePresetDialog::Item::Item(wxWindow* parent, wxBoxSizer* sizer, const std::string& def_name, PrinterTechnology pt /*= ptFFF*/): +SavePresetDialog::Item::Item(wxWindow* parent, wxBoxSizer* sizer, const std::string& def_name, PresetCollection* presets, PrinterTechnology pt /*= ptFFF*/): m_preset_name(def_name), + m_presets(presets), m_printer_technology(pt), m_parent(parent), m_valid_bmp(new wxStaticBitmap(m_parent, wxID_ANY, *get_bmp_bundle("tick_mark"))), @@ -152,6 +153,8 @@ SavePresetDialog::Item::Item(wxWindow* parent, wxBoxSizer* sizer, const std::str input_name_sizer->Add(m_valid_bmp, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, BORDER_W); init_input_name_ctrl(input_name_sizer, m_preset_name); + init_casei_preset_names(); + sizer->Add(input_name_sizer,0, wxEXPAND | wxBOTTOM, BORDER_W); sizer->Add(m_valid_label, 0, wxEXPAND | wxLEFT, 3*BORDER_W); diff --git a/src/slic3r/GUI/SavePresetDialog.hpp b/src/slic3r/GUI/SavePresetDialog.hpp index 6922dcfa9b..1cc98d56ec 100644 --- a/src/slic3r/GUI/SavePresetDialog.hpp +++ b/src/slic3r/GUI/SavePresetDialog.hpp @@ -41,7 +41,7 @@ public: }; Item(Preset::Type type, const std::string& suffix, wxBoxSizer* sizer, SavePresetDialog* parent, bool is_for_multiple_save); - Item(wxWindow* parent, wxBoxSizer* sizer, const std::string& def_name, PrinterTechnology pt = ptFFF); + Item(wxWindow* parent, wxBoxSizer* sizer, const std::string& def_name, PresetCollection* presets, PrinterTechnology pt = ptFFF); void update_valid_bmp(); void accept();