Deleted use of TaskTimer in OnInit
+ code cleaning in MainFrame
This commit is contained in:
parent
97e3100c73
commit
8459d77959
3 changed files with 1 additions and 8 deletions
|
@ -634,7 +634,6 @@ bool GUI_App::OnInit()
|
||||||
|
|
||||||
bool GUI_App::on_init_inner()
|
bool GUI_App::on_init_inner()
|
||||||
{
|
{
|
||||||
TaskTimer timer("on_init");
|
|
||||||
// Verify resources path
|
// Verify resources path
|
||||||
const wxString resources_dir = from_u8(Slic3r::resources_dir());
|
const wxString resources_dir = from_u8(Slic3r::resources_dir());
|
||||||
wxCHECK_MSG(wxDirExists(resources_dir), false,
|
wxCHECK_MSG(wxDirExists(resources_dir), false,
|
||||||
|
@ -759,8 +758,6 @@ bool GUI_App::on_init_inner()
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
scrn->SetText(_L("Creating settings tabs..."));
|
scrn->SetText(_L("Creating settings tabs..."));
|
||||||
|
|
||||||
TaskTimer timer2("Creating settings tabs");
|
|
||||||
|
|
||||||
mainframe = new MainFrame();
|
mainframe = new MainFrame();
|
||||||
// hide settings tabs after first Layout
|
// hide settings tabs after first Layout
|
||||||
mainframe->select_tab(size_t(0));
|
mainframe->select_tab(size_t(0));
|
||||||
|
|
|
@ -668,8 +668,6 @@ void MainFrame::add_created_tab(Tab* panel)
|
||||||
|
|
||||||
bool MainFrame::is_active_and_shown_tab(Tab* tab)
|
bool MainFrame::is_active_and_shown_tab(Tab* tab)
|
||||||
{
|
{
|
||||||
if (!this)
|
|
||||||
return false;
|
|
||||||
int page_id = m_tabpanel->FindPage(tab);
|
int page_id = m_tabpanel->FindPage(tab);
|
||||||
|
|
||||||
if (m_tabpanel->GetSelection() != page_id)
|
if (m_tabpanel->GetSelection() != page_id)
|
||||||
|
|
|
@ -3471,10 +3471,8 @@ bool Tab::tree_sel_change_delayed()
|
||||||
//for (auto& el : m_pages)
|
//for (auto& el : m_pages)
|
||||||
// el.get()->Hide();
|
// 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);
|
activate_selected_page(throw_if_canceled);
|
||||||
// m_active_page->Show();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
no_updates.reset(nullptr);
|
no_updates.reset(nullptr);
|
||||||
|
|
Loading…
Reference in a new issue