mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-28 16:42:02 +08:00
trying prevent opengl assert bug in archlinux
supermerill/SuperSlicer#1056
This commit is contained in:
parent
51af7db152
commit
c206555a96
@ -322,10 +322,10 @@ void MainFrame::update_layout()
|
|||||||
wxGetApp().app_config->get("tab_settings_layout_mode") == "1" ? ESettingsLayout::Tabs :
|
wxGetApp().app_config->get("tab_settings_layout_mode") == "1" ? ESettingsLayout::Tabs :
|
||||||
wxGetApp().app_config->get("new_settings_layout_mode") == "1" ? ESettingsLayout::Hidden :
|
wxGetApp().app_config->get("new_settings_layout_mode") == "1" ? ESettingsLayout::Hidden :
|
||||||
wxGetApp().app_config->get("dlg_settings_layout_mode") == "1" ? ESettingsLayout::Dlg :
|
wxGetApp().app_config->get("dlg_settings_layout_mode") == "1" ? ESettingsLayout::Dlg :
|
||||||
#ifdef __APPLE__
|
#ifdef __WXMSW__
|
||||||
ESettingsLayout::Old);
|
|
||||||
#else
|
|
||||||
ESettingsLayout::Tabs);
|
ESettingsLayout::Tabs);
|
||||||
|
#else
|
||||||
|
ESettingsLayout::Old);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (m_layout == layout)
|
if (m_layout == layout)
|
||||||
@ -404,6 +404,8 @@ void MainFrame::update_layout()
|
|||||||
{
|
{
|
||||||
// don't use view_toolbar here
|
// don't use view_toolbar here
|
||||||
m_plater->enable_view_toolbar(false);
|
m_plater->enable_view_toolbar(false);
|
||||||
|
bool need_freeze = !this->IsFrozen();
|
||||||
|
if(need_freeze) this->Freeze();
|
||||||
// icons for ESettingsLayout::Tabs
|
// icons for ESettingsLayout::Tabs
|
||||||
wxImageList* img_list = nullptr;
|
wxImageList* img_list = nullptr;
|
||||||
int icon_size = 0;
|
int icon_size = 0;
|
||||||
@ -447,6 +449,7 @@ void MainFrame::update_layout()
|
|||||||
m_main_sizer->Add(m_tabpanel, 1, wxEXPAND);
|
m_main_sizer->Add(m_tabpanel, 1, wxEXPAND);
|
||||||
m_plater->Show();
|
m_plater->Show();
|
||||||
m_tabpanel->Show();
|
m_tabpanel->Show();
|
||||||
|
if (need_freeze) this->Thaw();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ESettingsLayout::Hidden:
|
case ESettingsLayout::Hidden:
|
||||||
@ -682,7 +685,12 @@ void MainFrame::init_tabpanel()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool need_freeze = !this->IsFrozen();
|
bool need_freeze = !this->IsFrozen();
|
||||||
|
bool need_freeze_plater = false;
|
||||||
if(need_freeze) Freeze();
|
if(need_freeze) Freeze();
|
||||||
|
else {
|
||||||
|
need_freeze_plater = !m_plater->IsFrozen();
|
||||||
|
if (need_freeze_plater) m_plater->Freeze();
|
||||||
|
}
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
BOOST_LOG_TRIVIAL(debug) << "I switched to tab " << m_tabpanel->GetSelection() << " and so i need to change the panel position & content\n";
|
BOOST_LOG_TRIVIAL(debug) << "I switched to tab " << m_tabpanel->GetSelection() << " and so i need to change the panel position & content\n";
|
||||||
#endif
|
#endif
|
||||||
@ -740,6 +748,7 @@ void MainFrame::init_tabpanel()
|
|||||||
m_last_selected_plater_tab = m_tabpanel->GetSelection();
|
m_last_selected_plater_tab = m_tabpanel->GetSelection();
|
||||||
|
|
||||||
if (need_freeze) Thaw();
|
if (need_freeze) Thaw();
|
||||||
|
else if (need_freeze_plater) m_plater->Freeze();
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
m_tabpanel->ChangeSelection(new_tab);
|
m_tabpanel->ChangeSelection(new_tab);
|
||||||
m_tabpanel->Refresh();
|
m_tabpanel->Refresh();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user