From 046f9d238062d69384aa5d58e33ea7692184af78 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 25 Nov 2021 09:46:52 +0100 Subject: [PATCH 1/3] ConfigWizard: Improved detection of the preferred printer technology when new printers are added --- src/slic3r/GUI/ConfigWizard.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index 85268fca15..f674abd0c0 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -2522,23 +2522,33 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese { wxString header, caption = _L("Configuration is edited in ConfigWizard"); const auto enabled_vendors = appconfig_new.vendors(); + const auto enabled_vendors_old = app_config->vendors(); bool suppress_sla_printer = model_has_multi_part_objects(wxGetApp().model()); PrinterTechnology preferred_pt = ptAny; - auto get_preferred_printer_technology = [enabled_vendors, suppress_sla_printer](const std::string& bundle_name, const Bundle& bundle) { + auto get_preferred_printer_technology = [enabled_vendors, enabled_vendors_old, suppress_sla_printer](const std::string& bundle_name, const Bundle& bundle) { const auto config = enabled_vendors.find(bundle_name); PrinterTechnology pt = ptAny; if (config != enabled_vendors.end()) { for (const auto& model : bundle.vendor_profile->models) { if (const auto model_it = config->second.find(model.id); model_it != config->second.end() && model_it->second.size() > 0) { - if (pt == ptAny) - pt = model.technology; - // if preferred printer model has SLA printer technology it's important to check the model for multypart state - if (pt == ptSLA && suppress_sla_printer) - continue; - else + pt = model.technology; + const auto config_old = enabled_vendors_old.find(bundle_name); + if (config_old == enabled_vendors_old.end() || config_old->second.find(model.id) == config_old->second.end()) { + // if preferred printer model has SLA printer technology it's important to check the model for multi-part state + if (pt == ptSLA && suppress_sla_printer) + continue; return pt; + } + + if (const auto model_it_old = config_old->second.find(model.id); + model_it_old == config_old->second.end() || model_it_old->second != model_it->second) { + // if preferred printer model has SLA printer technology it's important to check the model for multi-part state + if (pt == ptSLA && suppress_sla_printer) + continue; + return pt; + } } } } @@ -2645,7 +2655,6 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese std::string preferred_model; std::string preferred_variant; - const auto enabled_vendors_old = app_config->vendors(); auto get_preferred_printer_model = [enabled_vendors, enabled_vendors_old, preferred_pt](const std::string& bundle_name, const Bundle& bundle, std::string& variant) { const auto config = enabled_vendors.find(bundle_name); if (config == enabled_vendors.end()) From 7ec7d5181a22601b273f5d332d35b2d180b74af5 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 8 Dec 2021 17:30:27 +0100 Subject: [PATCH 2/3] Updated tooltip on 'synchronize supports with object layers' --- src/libslic3r/PrintConfig.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 11e741ec61..b22d3b2409 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2751,7 +2751,8 @@ void PrintConfigDef::init_fff_params() def->label = L("Synchronize with object layers"); def->category = L("Support material"); def->tooltip = L("Synchronize support layers with the object print layers. This is useful " - "with multi-material printers, where the extruder switch is expensive."); + "with multi-material printers, where the extruder switch is expensive. " + "This option is only available when top contact Z distance is set to zero."); def->mode = comExpert; def->set_default_value(new ConfigOptionBool(false)); From 0d6f2df268add2d0e4d6cc44d3d4def6f321ce64 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 9 Dec 2021 09:00:58 +0100 Subject: [PATCH 3/3] Tech ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT - Fixed missing tooltips passed as parameter to ImGuiWrapper::slider_float --- src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp index 691a867063..440e81356d 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp @@ -549,9 +549,13 @@ RENDER_AGAIN: m_imgui->text(m_desc.at("offset")); ImGui::SameLine(settings_sliders_left, m_imgui->get_item_spacing().x); ImGui::PushItemWidth(window_width - settings_sliders_left); +#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT + m_imgui->slider_float("##offset", &offset, offset_min, offset_max, "%.1f mm", 1.0f, true, _L(opts[0].second->tooltip)); +#else m_imgui->slider_float("##offset", &offset, offset_min, offset_max, "%.1f mm"); if (m_imgui->get_last_slider_status().hovered) m_imgui->tooltip((_utf8(opts[0].second->tooltip)).c_str(), max_tooltip_width); +#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT bool slider_clicked = m_imgui->get_last_slider_status().clicked; // someone clicked the slider bool slider_edited =m_imgui->get_last_slider_status().edited; // someone is dragging the slider @@ -561,9 +565,13 @@ RENDER_AGAIN: ImGui::AlignTextToFramePadding(); m_imgui->text(m_desc.at("quality")); ImGui::SameLine(settings_sliders_left, m_imgui->get_item_spacing().x); +#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT + m_imgui->slider_float("##quality", &quality, quality_min, quality_max, "%.1f", 1.0f, true, _L(opts[1].second->tooltip)); +#else m_imgui->slider_float("##quality", &quality, quality_min, quality_max, "%.1f"); if (m_imgui->get_last_slider_status().hovered) m_imgui->tooltip((_utf8(opts[1].second->tooltip)).c_str(), max_tooltip_width); +#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT slider_clicked |= m_imgui->get_last_slider_status().clicked; slider_edited |= m_imgui->get_last_slider_status().edited; @@ -574,9 +582,13 @@ RENDER_AGAIN: ImGui::AlignTextToFramePadding(); m_imgui->text(m_desc.at("closing_distance")); ImGui::SameLine(settings_sliders_left, m_imgui->get_item_spacing().x); +#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT + m_imgui->slider_float("##closing_distance", &closing_d, closing_d_min, closing_d_max, "%.1f mm", 1.0f, true, _L(opts[2].second->tooltip)); +#else m_imgui->slider_float("##closing_distance", &closing_d, closing_d_min, closing_d_max, "%.1f mm"); if (m_imgui->get_last_slider_status().hovered) m_imgui->tooltip((_utf8(opts[2].second->tooltip)).c_str(), max_tooltip_width); +#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT slider_clicked |= m_imgui->get_last_slider_status().clicked; slider_edited |= m_imgui->get_last_slider_status().edited;