From db8ca5feac3617c4d5de8092239a323740ac2a0f Mon Sep 17 00:00:00 2001 From: Rodrigo Faselli <162915171+RF47@users.noreply.github.com> Date: Sat, 9 May 2026 02:45:18 -0300 Subject: [PATCH] Only warning about sparse infill rotation template the first time (#13461) Only warning the first time --- src/slic3r/GUI/Tab.cpp | 7 ++++++- src/slic3r/GUI/Tab.hpp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 707414c500..ae052861a0 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1241,6 +1241,8 @@ void Tab::reload_config() { if (m_active_page) m_active_page->reload_config(); + if (m_type == Preset::TYPE_PRINT && m_config != nullptr) + m_last_sparse_infill_rotate_template_value = m_config->opt_string("sparse_infill_rotate_template"); } void Tab::update_mode() @@ -1744,8 +1746,9 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) auto new_value = boost::any_cast(value); is_safe_to_rotate = is_safe_to_rotate || new_value.empty(); + const bool had_previous_value = !m_last_sparse_infill_rotate_template_value.empty(); - if (!is_safe_to_rotate) { + if (!is_safe_to_rotate && !had_previous_value) { wxString msg_text = _( L("Infill patterns are typically designed to handle rotation automatically to ensure proper printing and achieve their " "intended effects (e.g., Gyroid, Cubic). Rotating the current sparse infill pattern may lead to insufficient support. " @@ -1762,6 +1765,8 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) wxGetApp().plater()->update(); } } + + m_last_sparse_infill_rotate_template_value = m_config->opt_string("sparse_infill_rotate_template"); } if(opt_key=="layer_height"){ diff --git a/src/slic3r/GUI/Tab.hpp b/src/slic3r/GUI/Tab.hpp index 525dd0c32e..56b58ec79c 100644 --- a/src/slic3r/GUI/Tab.hpp +++ b/src/slic3r/GUI/Tab.hpp @@ -445,6 +445,7 @@ protected: void filter_diff_option(std::vector &options); ConfigManipulation m_config_manipulation; + std::string m_last_sparse_infill_rotate_template_value; ConfigManipulation get_config_manipulation(); friend class EditGCodeDialog; };