From 005f65a3b2992a007c52eae89f815f760fdf7287 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Wed, 28 Feb 2024 10:14:06 +0100 Subject: [PATCH] Do not store current changes when delete style (cherry picked from commit 1b1e14a2bc1ae0536dc2d5f395605d303aaa4ca2) --- src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp | 4 ++-- src/slic3r/Utils/EmbossStyleManager.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index 17cb8f8454..286c0969a3 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -2058,7 +2058,7 @@ void GLGizmoEmboss::draw_style_add_button() ImGui::SameLine(); if (draw_button(m_icons, IconType::add, !can_add)) { if (!m_style_manager.exist_stored_style()) { - m_style_manager.store_styles_to_app_config(wxGetApp().app_config); + m_style_manager.store_styles_to_app_config(); } else { ImGui::OpenPopup(popup_id); } @@ -2124,7 +2124,7 @@ void GLGizmoEmboss::draw_delete_style_button() { break; } if (exist_change) - m_style_manager.store_styles_to_app_config(wxGetApp().app_config); + m_style_manager.store_styles_to_app_config(false); } if (ImGui::IsItemHovered()) { diff --git a/src/slic3r/Utils/EmbossStyleManager.hpp b/src/slic3r/Utils/EmbossStyleManager.hpp index bce87d04c8..ece9de46be 100644 --- a/src/slic3r/Utils/EmbossStyleManager.hpp +++ b/src/slic3r/Utils/EmbossStyleManager.hpp @@ -51,7 +51,7 @@ public: /// /// Configuration /// When true cache state will be used for store - /// When true store activ index into configuration + /// When treu also store current activ index /// True on succes otherwise False. bool store_styles_to_app_config(bool use_modification = true, bool store_active_index = true);