From 0596660dda8f209e441ab0d3ba5d432fe37cbc67 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 27 Feb 2018 09:51:14 +0100 Subject: [PATCH] Fix bug with not displaying flags for incompatible presets --- xs/src/slic3r/GUI/GUI.cpp | 1 - xs/src/slic3r/GUI/Tab.cpp | 1 + xs/src/slic3r/GUI/Tab.hpp | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 13d3db908f..6f97bc494c 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -477,7 +477,6 @@ void change_opt_value(DynamicPrintConfig& config, t_config_option_key opt_key, b void add_created_tab(Tab* panel, PresetBundle *preset_bundle) { - panel->m_show_btn_incompatible_presets = g_AppConfig->get("show_incompatible_presets").empty(); panel->create_preset_tab(preset_bundle); // Load the currently selected preset into the GUI, update the preset selection box. diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index dabbbeb36f..1df4223287 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1614,6 +1614,7 @@ void Tab::update_ui_from_settings() { // Show the 'show / hide presets' button only for the print and filament tabs, and only if enabled // in application preferences. + m_show_btn_incompatible_presets = get_app_config()->get("show_incompatible_presets")[0] == '1' ? true : false; bool show = m_show_btn_incompatible_presets && m_presets->name().compare("printer") != 0; show ? m_btn_hide_incompatible_presets->Show() : m_btn_hide_incompatible_presets->Hide(); // If the 'show / hide presets' button is hidden, hide the incompatible presets. diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index d684005fb0..208f99fec2 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -106,7 +106,7 @@ protected: public: PresetBundle* m_preset_bundle; - bool m_show_btn_incompatible_presets; + bool m_show_btn_incompatible_presets = false; PresetCollection* m_presets; DynamicPrintConfig* m_config;