FIX:fix image error during startup

Change-Id: I9aaca80622ef22b35f30c5b1e6072e983014139f
(cherry picked from commit e9abc0eea926a62fe519525c269c1ce33245df65)
This commit is contained in:
xiangdong.yang 2022-08-04 11:16:53 +08:00 committed by Lane.Wei
parent efa80db8de
commit 39a0b06b39

View file

@ -557,7 +557,7 @@ Slic3r::GUI::PageShp Tab::add_options_page(const wxString& title, const std::str
if (icon_idx == -1) {
// Add a new icon to the icon list.
m_scaled_icons_list.push_back(ScalableBitmap(this, icon, 32, false, true));
m_icons->Add(m_scaled_icons_list.back().bmp());
//m_icons->Add(m_scaled_icons_list.back().bmp());
icon_idx = ++m_icon_count;
m_icon_index[icon] = icon_idx;
}
@ -1180,7 +1180,7 @@ void Tab::msw_rescale()
m_icons->RemoveAll();
m_icons = new wxImageList(m_scaled_icons_list.front().bmp().GetWidth(), m_scaled_icons_list.front().bmp().GetHeight(), false);
for (ScalableBitmap& bmp : m_scaled_icons_list)
m_icons->Add(bmp.bmp());
//m_icons->Add(bmp.bmp());
m_tabctrl->AssignImageList(m_icons);
// rescale options_groups
@ -1214,7 +1214,7 @@ void Tab::sys_color_changed()
m_icons->RemoveAll();
m_icons = new wxImageList(m_scaled_icons_list.front().bmp().GetWidth(), m_scaled_icons_list.front().bmp().GetHeight(), false);
for (ScalableBitmap& bmp : m_scaled_icons_list)
m_icons->Add(bmp.bmp());
//m_icons->Add(bmp.bmp());
m_tabctrl->AssignImageList(m_icons);
// Colors for ui "decoration"