Do not store current changes when delete style

(cherry picked from commit 1b1e14a2bc1ae0536dc2d5f395605d303aaa4ca2)
This commit is contained in:
Filip Sykala - NTB T15p 2024-02-28 10:14:06 +01:00 committed by Lukas Matena
parent 6495bb6ece
commit 005f65a3b2
2 changed files with 3 additions and 3 deletions

View File

@ -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()) {

View File

@ -51,7 +51,7 @@ public:
/// </summary>
/// <param name="item_to_store">Configuration</param>
/// <param name="use_modification">When true cache state will be used for store</param>
/// <param name="use_modification">When true store activ index into configuration</param>
/// <param name="store_active_index">When treu also store current activ index</param>
/// <returns>True on succes otherwise False.</returns>
bool store_styles_to_app_config(bool use_modification = true, bool store_active_index = true);