OnInit: Move preset loading out of EVT_IDLE/once, remove temp workaround of sidebar scrollbar
This commit is contained in:
parent
75cf1cde92
commit
9522cd1d4f
@ -167,17 +167,6 @@ bool GUI_App::OnInit()
|
|||||||
if (app_config->dirty() && app_config->get("autosave") == "1")
|
if (app_config->dirty() && app_config->get("autosave") == "1")
|
||||||
app_config->save();
|
app_config->save();
|
||||||
|
|
||||||
// ! Temporary workaround for the correct behavior of the Scrolled sidebar panel
|
|
||||||
// Do this "manipulations" only once ( after (re)create of the application )
|
|
||||||
if (sidebar().obj_list()->GetMinHeight() > 15 * wxGetApp().em_unit())
|
|
||||||
{
|
|
||||||
wxWindowUpdateLocker noUpdates_sidebar(&sidebar());
|
|
||||||
sidebar().obj_list()->SetMinSize(wxSize(-1, 15 * wxGetApp().em_unit()));
|
|
||||||
|
|
||||||
// !!! to correct later layouts
|
|
||||||
update_mode(); // update view mode after fix of the object_list size
|
|
||||||
}
|
|
||||||
|
|
||||||
this->obj_manipul()->update_if_dirty();
|
this->obj_manipul()->update_if_dirty();
|
||||||
|
|
||||||
// Preset updating & Configwizard are done after the above initializations,
|
// Preset updating & Configwizard are done after the above initializations,
|
||||||
@ -205,11 +194,12 @@ bool GUI_App::OnInit()
|
|||||||
}
|
}
|
||||||
preset_updater->sync(preset_bundle);
|
preset_updater->sync(preset_bundle);
|
||||||
});
|
});
|
||||||
|
|
||||||
load_current_presets();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
load_current_presets();
|
||||||
|
update_mode(); // update view mode after fix of the object_list size
|
||||||
|
|
||||||
mainframe->Show(true);
|
mainframe->Show(true);
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
return true;
|
return true;
|
||||||
|
@ -115,10 +115,7 @@ ObjectList::~ObjectList()
|
|||||||
|
|
||||||
void ObjectList::create_objects_ctrl()
|
void ObjectList::create_objects_ctrl()
|
||||||
{
|
{
|
||||||
// temporary workaround for the correct behavior of the Scrolled sidebar panel:
|
SetMinSize(wxSize(-1, 15 * wxGetApp().em_unit()));
|
||||||
// 1. set a height of the list to some big value
|
|
||||||
// 2. change it to the normal min value (200) after first whole App updating/layouting
|
|
||||||
SetMinSize(wxSize(-1, 3000)); // #ys_FIXME
|
|
||||||
|
|
||||||
m_sizer = new wxBoxSizer(wxVERTICAL);
|
m_sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
m_sizer->Add(this, 1, wxGROW);
|
m_sizer->Add(this, 1, wxGROW);
|
||||||
|
Loading…
Reference in New Issue
Block a user