diff options
author | supermerill <merill@free.fr> | 2022-05-19 00:32:17 +0300 |
---|---|---|
committer | supermerill <merill@free.fr> | 2022-05-19 00:32:17 +0300 |
commit | 4c530ca749990efa5a32f553996119dfe028adf1 (patch) | |
tree | 7e8e81c2738c921b0a08ab05c3f1c60591e153aa | |
parent | ecc7861321786e7e0ed2b1db71391e1a3abcb8f5 (diff) |
Fix no icon on tabs
supermerill/SuperSlicer#2822
-rw-r--r-- | src/slic3r/GUI/MainFrame.cpp | 8 | ||||
-rw-r--r-- | src/slic3r/GUI/Notebook.hpp | 4 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 2805fd15e..fd798be26 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -1009,12 +1009,12 @@ void MainFrame::init_tabpanel() m_tabpanel->Hide(); m_settings_dialog.set_tabpanel(m_tabpanel); +#ifndef _USE_CUSTOM_NOTEBOOK int icon_size = 0; try { icon_size = atoi(wxGetApp().app_config->get("tab_icon_size").c_str()); } catch (std::exception e) {} -#ifndef _USE_CUSTOM_NOTEBOOK // icons for m_tabpanel tabs wxImageList* img_list = nullptr; if (icon_size >= 8) { @@ -1272,12 +1272,6 @@ void MainFrame::add_created_tab(Tab* panel) const auto printer_tech = wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology(); - int icon_size = 0; - try { - icon_size = atoi(wxGetApp().app_config->get("tab_icon_size").c_str()); - } - catch (std::exception e) {} - if (panel->supports_printer_technology(printer_tech)) { #ifdef _USE_CUSTOM_NOTEBOOK if (!wxGetApp().tabs_as_menu()) { diff --git a/src/slic3r/GUI/Notebook.hpp b/src/slic3r/GUI/Notebook.hpp index 9a3241350..d76965509 100644 --- a/src/slic3r/GUI/Notebook.hpp +++ b/src/slic3r/GUI/Notebook.hpp @@ -216,7 +216,7 @@ public: return false; //create the button - GetBtnsListCtrl()->InsertPage(n, text, bSelect, bmp_name, bmp_size); + GetBtnsListCtrl()->InsertPage(n, text, bSelect, bmp_size > 0 ? bmp_name : "", bmp_size); if (bSelect) SetBtSelection(n); @@ -237,7 +237,7 @@ public: btidx_to_tabpage.insert(btidx_to_tabpage.begin() + n, page_idx); //create the button - GetBtnsListCtrl()->InsertPage(n, text, bSelect, bmp_name, bmp_size); + GetBtnsListCtrl()->InsertPage(n, text, bSelect, bmp_size > 0 ? bmp_name : "", bmp_size); if (bSelect) |