diff options
author | YuSanka <yusanka@gmail.com> | 2018-04-19 13:08:59 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2018-04-19 13:08:59 +0300 |
commit | 7083f58326c07050349fe8c0d999a1ee49702e5c (patch) | |
tree | 0865f6bbff51d26dfb4f54b3379bc909ed337f7b /xs/src/slic3r/GUI/Tab.cpp | |
parent | f38f0edaaf3dc2b7c748e3b7c642ecbeaf140113 (diff) |
Added lock icons to system presets in ComboBoxes.
Added right event handling if informative string is selected in ComboBoxes
Diffstat (limited to 'xs/src/slic3r/GUI/Tab.cpp')
-rw-r--r-- | xs/src/slic3r/GUI/Tab.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 2cc51e0b5..810ee6e14 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -198,8 +198,16 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) //! select_preset(m_presets_choice->GetStringSelection().ToStdString()); //! we doing next: int selected_item = m_presets_choice->GetSelection(); + if (m_selected_preset_item == selected_item) + return; if (selected_item >= 0){ std::string selected_string = m_presets_choice->GetString(selected_item).ToUTF8().data(); + if (selected_string == "------- System presets -------" || + selected_string == "------- User presets -------"){ + m_presets_choice->SetSelection(m_selected_preset_item); + return; + } + m_selected_preset_item = selected_item; select_preset(selected_string); } })); @@ -488,7 +496,7 @@ void Tab::update_dirty(){ void Tab::update_tab_ui() { - m_presets->update_tab_ui(m_presets_choice, m_show_incompatible_presets); + m_selected_preset_item = m_presets->update_tab_ui(m_presets_choice, m_show_incompatible_presets); // update_tab_presets(m_cc_presets_choice, m_show_incompatible_presets); // update_presetsctrl(m_presetctrl, m_show_incompatible_presets); } |