From 1589d89ca20d4ddf523a75b0d4b821b7e620da9e Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 6 Oct 2022 16:28:38 +0200 Subject: [PATCH] Fixes for template filament profiles: - do not show "Template Filaments" in the list of vendors in wizard - slight refactoring - typos --- src/libslic3r/Preset.cpp | 3 +-- src/slic3r/GUI/ConfigWizard.cpp | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 355b44a5dd..951cc7018d 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1218,8 +1218,7 @@ size_t PresetCollection::update_compatible_internal(const PresetWithVendorProfil for (size_t idx_preset = m_num_default_presets; idx_preset < m_presets.size(); ++idx_preset) { if (m_presets[idx_preset].vendor && !m_presets[idx_preset].vendor->templates_profile && m_presets[idx_preset].is_compatible) { std::string preset_alias = m_presets[idx_preset].alias; - for (size_t idx_in_templates = 0; idx_in_templates < indices_of_template_presets.size(); ++idx_in_templates) { - size_t idx_of_template_in_presets = indices_of_template_presets[idx_in_templates]; + for (size_t idx_of_template_in_presets : indices_of_template_presets) { if (m_presets[idx_of_template_in_presets].alias == preset_alias) { // unselect selected template filament if there is non-template alias compatible if (idx_of_template_in_presets == m_idx_selected && (unselect_if_incompatible == PresetSelectCompatibleType::Always || unselect_if_incompatible == PresetSelectCompatibleType::OnlyIfWasCompatible)) { diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index 49f5426f7e..2ecdca1ea0 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -1197,7 +1197,7 @@ void PageMaterials::select_material(int i) const std::string& alias_key = list_profile->get_data(i); if (checked && template_shown && !notification_shown) { notification_shown = true; - wxString message = _L("You have selelected template filament. Please note that these filaments are available for all printers but are NOT certain to be compatible with your printer. Do you still wish to have this filament selected?\n(This message won't be displayed again.)"); + wxString message = _L("You have selected template filament. Please note that these filaments are available for all printers but are NOT certain to be compatible with your printer. Do you still wish to have this filament selected?\n(This message won't be displayed again.)"); MessageDialog msg(this, message, _L("Notice"), wxYES_NO); if (msg.ShowModal() == wxID_NO) { list_profile->Check(i, false); @@ -1608,6 +1608,8 @@ PageVendors::PageVendors(ConfigWizard *parent) for (const auto &pair : wizard_p()->bundles) { const VendorProfile *vendor = pair.second.vendor_profile; if (vendor->id == PresetBundle::PRUSA_BUNDLE) { continue; } + if (vendor->templates_profile) + continue; auto *cbox = new wxCheckBox(this, wxID_ANY, vendor->name); cbox->Bind(wxEVT_CHECKBOX, [=](wxCommandEvent &event) {