ENABLE_LAYOUT_NO_RESTART -> Fixed MainFrame::update_layout() for Linux build

This commit is contained in:
enricoturri1966 2020-06-17 09:34:33 +02:00
parent cfb552d496
commit 3383650c00

View file

@ -242,16 +242,17 @@ void MainFrame::update_layout()
}
};
// On Linux m_plater needs to be removed from m_tabpanel before to reparent it
int plater_page_id = m_tabpanel->FindPage(m_plater);
if (plater_page_id != wxNOT_FOUND)
m_tabpanel->RemovePage(plater_page_id);
if (m_plater->GetParent() != this)
m_plater->Reparent(this);
if (m_tabpanel->GetParent() != this)
m_tabpanel->Reparent(this);
int plater_page_id = m_tabpanel->FindPage(m_plater);
if (plater_page_id != wxNOT_FOUND)
m_tabpanel->RemovePage(plater_page_id);
plater_page_id = (m_plater_page != nullptr) ? m_tabpanel->FindPage(m_plater_page) : wxNOT_FOUND;
if (plater_page_id != wxNOT_FOUND) {
m_tabpanel->DeletePage(plater_page_id);