diff options
author | YuSanka <yusanka@gmail.com> | 2018-02-27 11:51:14 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2018-02-27 11:51:14 +0300 |
commit | 0596660dda8f209e441ab0d3ba5d432fe37cbc67 (patch) | |
tree | 76719328578af7342061503fb7b7340a2be52119 | |
parent | 7047f4365a5b1194ef9aab2611222281d3d40e90 (diff) |
Fix bug with not displaying flags for incompatible presets
-rw-r--r-- | xs/src/slic3r/GUI/GUI.cpp | 1 | ||||
-rw-r--r-- | xs/src/slic3r/GUI/Tab.cpp | 1 | ||||
-rw-r--r-- | 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 13d3db908..6f97bc494 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 dabbbeb36..1df422328 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 d684005fb..208f99fec 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; |