Improved application recreation after language change

This commit is contained in:
YuSanka 2019-01-24 15:32:50 +01:00
parent 6044be7793
commit 10641f7e9c
4 changed files with 20 additions and 11 deletions
src/slic3r/GUI

View file

@ -121,6 +121,11 @@ void MainFrame::init_tabpanel()
}
});
if (wxGetApp().plater_) {
// before creating a new plater let's delete old one
wxGetApp().plater_->Destroy();
wxGetApp().plater_ = nullptr;
}
m_plater = new Slic3r::GUI::Plater(m_tabpanel, this);
wxGetApp().plater_ = m_plater;
m_tabpanel->AddPage(m_plater, _(L("Plater")));