mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-02 05:30:41 +08:00
Do not store current changes when delete style
(cherry picked from commit 1b1e14a2bc1ae0536dc2d5f395605d303aaa4ca2)
This commit is contained in:
parent
6495bb6ece
commit
005f65a3b2
@ -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()) {
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user