Deleted use of TaskTimer in OnInit

+ code cleaning in MainFrame
This commit is contained in:
YuSanka 2020-10-02 12:11:10 +02:00
parent 97e3100c73
commit 8459d77959
3 changed files with 1 additions and 8 deletions

View File

@ -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));

View File

@ -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)

View File

@ -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);