From 5c3e5f507a92d64bea26685f127f98f6f64963d9 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 16 May 2023 15:47:01 +0200 Subject: [PATCH] Added a warning whenbed temperatures differ too much --- src/libslic3r/Print.cpp | 11 +++++++++++ src/slic3r/GUI/Plater.cpp | 6 ++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 68dcb2f03..ca3feb04e 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -472,6 +472,17 @@ std::string Print::validate(std::vector* warnings) const { std::vector extruders = this->extruders(); + if (warnings) { + for (size_t a=0; a 15 + || std::abs(m_config.first_layer_bed_temperature.get_at(extruders[a]) - m_config.first_layer_bed_temperature.get_at(extruders[b])) > 15) { + warnings->emplace_back("_BED_TEMPS_DIFFER"); + goto DONE; + } + DONE:; + } + if (m_objects.empty()) return _u8L("All objects are outside of the print volume."); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index cbf64aadd..180653f77 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3202,8 +3202,8 @@ void Plater::priv::process_validation_warning(const std::vector& wa { if (warnings.empty()) notification_manager->close_notification_of_type(NotificationType::ValidateWarning); - else { - std::string text = warnings.front(); + + for (std::string text : warnings) { std::string hypertext = ""; std::function action_fn = [](wxEvtHandler*){ return false; }; @@ -3222,6 +3222,8 @@ void Plater::priv::process_validation_warning(const std::vector& wa return true; }; } + if (text == "_BED_TEMPS_DIFFER") + text = _u8L("Bed temperatures for the used filaments differ significantly."); notification_manager->push_notification( NotificationType::ValidateWarning,