mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-19 01:55:52 +08:00
Merge branch 'dev' of https://github.com/prusa3d/PrusaSlicer into et_texture_support
This commit is contained in:
commit
36ce076de9
@ -2751,7 +2751,8 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->label = L("Synchronize with object layers");
|
def->label = L("Synchronize with object layers");
|
||||||
def->category = L("Support material");
|
def->category = L("Support material");
|
||||||
def->tooltip = L("Synchronize support layers with the object print layers. This is useful "
|
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->mode = comExpert;
|
||||||
def->set_default_value(new ConfigOptionBool(false));
|
def->set_default_value(new ConfigOptionBool(false));
|
||||||
|
|
||||||
|
@ -2522,23 +2522,33 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
|
|||||||
{
|
{
|
||||||
wxString header, caption = _L("Configuration is edited in ConfigWizard");
|
wxString header, caption = _L("Configuration is edited in ConfigWizard");
|
||||||
const auto enabled_vendors = appconfig_new.vendors();
|
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());
|
bool suppress_sla_printer = model_has_multi_part_objects(wxGetApp().model());
|
||||||
PrinterTechnology preferred_pt = ptAny;
|
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);
|
const auto config = enabled_vendors.find(bundle_name);
|
||||||
PrinterTechnology pt = ptAny;
|
PrinterTechnology pt = ptAny;
|
||||||
if (config != enabled_vendors.end()) {
|
if (config != enabled_vendors.end()) {
|
||||||
for (const auto& model : bundle.vendor_profile->models) {
|
for (const auto& model : bundle.vendor_profile->models) {
|
||||||
if (const auto model_it = config->second.find(model.id);
|
if (const auto model_it = config->second.find(model.id);
|
||||||
model_it != config->second.end() && model_it->second.size() > 0) {
|
model_it != config->second.end() && model_it->second.size() > 0) {
|
||||||
if (pt == ptAny)
|
pt = model.technology;
|
||||||
pt = model.technology;
|
const auto config_old = enabled_vendors_old.find(bundle_name);
|
||||||
// if preferred printer model has SLA printer technology it's important to check the model for multypart state
|
if (config_old == enabled_vendors_old.end() || config_old->second.find(model.id) == config_old->second.end()) {
|
||||||
if (pt == ptSLA && suppress_sla_printer)
|
// if preferred printer model has SLA printer technology it's important to check the model for multi-part state
|
||||||
continue;
|
if (pt == ptSLA && suppress_sla_printer)
|
||||||
else
|
continue;
|
||||||
return pt;
|
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_model;
|
||||||
std::string preferred_variant;
|
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) {
|
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);
|
const auto config = enabled_vendors.find(bundle_name);
|
||||||
if (config == enabled_vendors.end())
|
if (config == enabled_vendors.end())
|
||||||
|
@ -549,9 +549,13 @@ RENDER_AGAIN:
|
|||||||
m_imgui->text(m_desc.at("offset"));
|
m_imgui->text(m_desc.at("offset"));
|
||||||
ImGui::SameLine(settings_sliders_left, m_imgui->get_item_spacing().x);
|
ImGui::SameLine(settings_sliders_left, m_imgui->get_item_spacing().x);
|
||||||
ImGui::PushItemWidth(window_width - settings_sliders_left);
|
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");
|
m_imgui->slider_float("##offset", &offset, offset_min, offset_max, "%.1f mm");
|
||||||
if (m_imgui->get_last_slider_status().hovered)
|
if (m_imgui->get_last_slider_status().hovered)
|
||||||
m_imgui->tooltip((_utf8(opts[0].second->tooltip)).c_str(), max_tooltip_width);
|
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_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
|
bool slider_edited =m_imgui->get_last_slider_status().edited; // someone is dragging the slider
|
||||||
@ -561,9 +565,13 @@ RENDER_AGAIN:
|
|||||||
ImGui::AlignTextToFramePadding();
|
ImGui::AlignTextToFramePadding();
|
||||||
m_imgui->text(m_desc.at("quality"));
|
m_imgui->text(m_desc.at("quality"));
|
||||||
ImGui::SameLine(settings_sliders_left, m_imgui->get_item_spacing().x);
|
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");
|
m_imgui->slider_float("##quality", &quality, quality_min, quality_max, "%.1f");
|
||||||
if (m_imgui->get_last_slider_status().hovered)
|
if (m_imgui->get_last_slider_status().hovered)
|
||||||
m_imgui->tooltip((_utf8(opts[1].second->tooltip)).c_str(), max_tooltip_width);
|
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_clicked |= m_imgui->get_last_slider_status().clicked;
|
||||||
slider_edited |= m_imgui->get_last_slider_status().edited;
|
slider_edited |= m_imgui->get_last_slider_status().edited;
|
||||||
@ -574,9 +582,13 @@ RENDER_AGAIN:
|
|||||||
ImGui::AlignTextToFramePadding();
|
ImGui::AlignTextToFramePadding();
|
||||||
m_imgui->text(m_desc.at("closing_distance"));
|
m_imgui->text(m_desc.at("closing_distance"));
|
||||||
ImGui::SameLine(settings_sliders_left, m_imgui->get_item_spacing().x);
|
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");
|
m_imgui->slider_float("##closing_distance", &closing_d, closing_d_min, closing_d_max, "%.1f mm");
|
||||||
if (m_imgui->get_last_slider_status().hovered)
|
if (m_imgui->get_last_slider_status().hovered)
|
||||||
m_imgui->tooltip((_utf8(opts[2].second->tooltip)).c_str(), max_tooltip_width);
|
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_clicked |= m_imgui->get_last_slider_status().clicked;
|
||||||
slider_edited |= m_imgui->get_last_slider_status().edited;
|
slider_edited |= m_imgui->get_last_slider_status().edited;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user