diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 23f79c65f..09dcf875b 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -634,7 +634,6 @@ bool GUI_App::OnInit() bool GUI_App::on_init_inner() { - TaskTimer timer("on_init"); // Verify resources path const wxString resources_dir = from_u8(Slic3r::resources_dir()); wxCHECK_MSG(wxDirExists(resources_dir), false, @@ -759,8 +758,6 @@ bool GUI_App::on_init_inner() #endif // ENABLE_GCODE_VIEWER scrn->SetText(_L("Creating settings tabs...")); - TaskTimer timer2("Creating settings tabs"); - mainframe = new MainFrame(); // hide settings tabs after first Layout mainframe->select_tab(size_t(0)); diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 4ecd36c7f..6ee496052 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -668,8 +668,6 @@ void MainFrame::add_created_tab(Tab* panel) bool MainFrame::is_active_and_shown_tab(Tab* tab) { - if (!this) - return false; int page_id = m_tabpanel->FindPage(tab); if (m_tabpanel->GetSelection() != page_id) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 3517381cf..924f3c8bb 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3471,10 +3471,8 @@ bool Tab::tree_sel_change_delayed() //for (auto& el : m_pages) // el.get()->Hide(); - if (wxGetApp().mainframe->is_active_and_shown_tab(this)) { + if (wxGetApp().mainframe!=nullptr && wxGetApp().mainframe->is_active_and_shown_tab(this)) activate_selected_page(throw_if_canceled); - // m_active_page->Show(); - } #ifdef __linux__ no_updates.reset(nullptr);