From 84c4f181e438a55d9e4753dbd8c7a1bac34f365d Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 26 Nov 2021 11:35:29 +0100 Subject: [PATCH] Next fix for #6814. "support_material_overhangs_queried" variable have not to be static after a fixing of the #6124. --- src/slic3r/GUI/ConfigManipulation.cpp | 6 +++--- src/slic3r/GUI/ConfigManipulation.hpp | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 7e64abcde1..0b2af37b8e 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -162,8 +162,8 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con if (config->opt_bool("support_material")) { // Ask only once. - if (!support_material_overhangs_queried) { - support_material_overhangs_queried = true; + if (!m_support_material_overhangs_queried) { + m_support_material_overhangs_queried = true; if (!config->opt_bool("overhangs")/* != 1*/) { wxString msg_text = _(L("Supports work better, if the following feature is enabled:\n" "- Detect bridging perimeters")); @@ -182,7 +182,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con } } else { - support_material_overhangs_queried = false; + m_support_material_overhangs_queried = false; } if (config->option("fill_density")->value == 100) { diff --git a/src/slic3r/GUI/ConfigManipulation.hpp b/src/slic3r/GUI/ConfigManipulation.hpp index 0d6250b5af..0e6815753e 100644 --- a/src/slic3r/GUI/ConfigManipulation.hpp +++ b/src/slic3r/GUI/ConfigManipulation.hpp @@ -17,15 +17,12 @@ class ModelConfig; namespace GUI { -// This variable have to be static because of use its value from Preset configuration -// and from object/parts configuration from the Settings in sidebar -static bool support_material_overhangs_queried {false}; - class ConfigManipulation { bool is_msg_dlg_already_exist{ false }; bool m_is_initialized_support_material_overhangs_queried{ false }; + bool m_support_material_overhangs_queried{ false }; // function to loading of changed configuration std::function load_config = nullptr; @@ -66,7 +63,7 @@ public: void initialize_support_material_overhangs_queried(bool queried) { m_is_initialized_support_material_overhangs_queried = true; - support_material_overhangs_queried = queried; + m_support_material_overhangs_queried = queried; } };