Fixed show_info_sizer according to selected mode.

+ fixed right panel layouts
+ deleted unused functions
This commit is contained in:
YuSanka 2018-11-13 12:19:56 +01:00
parent 5089c4e2e0
commit b721f9431a
6 changed files with 17 additions and 43 deletions

View file

@ -1016,7 +1016,6 @@ void ObjectList::part_selection_changed()
bool update_and_show_manipulations = false;
bool update_and_show_settings = false;
bool show_info_sizer = false;
if (multiple_selection()) {
og_name = _(L("Group manipulation"));
@ -1033,7 +1032,6 @@ void ObjectList::part_selection_changed()
og_name = _(L("Object manipulation"));
m_config = &(*m_objects)[obj_idx]->config;
update_and_show_manipulations = true;
show_info_sizer = true;
}
else {
auto parent = m_objects_model->GetParent(item);
@ -1082,25 +1080,15 @@ void ObjectList::part_selection_changed()
if (update_and_show_settings)
wxGetApp().obj_settings()->get_og()->set_name(" " + og_name + " ");
auto panel = wxGetApp().sidebar().scrolled_panel();
panel->Freeze();
Sidebar& panel = wxGetApp().sidebar();
panel.Freeze();
wxGetApp().obj_manipul() ->UpdateAndShow(update_and_show_manipulations);
wxGetApp().obj_settings()->UpdateAndShow(update_and_show_settings);
show_info_sizer ? wxGetApp().sidebar().update_info_sizer() : wxGetApp().sidebar().show_info_sizer(false);
wxGetApp().sidebar().show_info_sizer();
panel->Thaw();
}
void ObjectList::update_manipulation_sizer(const bool is_simple_mode)
{
auto item = GetSelection(); /// #ys_FIXME_to_multi_sel
if (!item || !is_simple_mode)
return;
if (m_objects_model->IsSettingsItem(item)) {
select_item(m_objects_model->GetParent(item));
}
panel.Layout();
panel.Thaw();
}
void ObjectList::add_object_to_list(size_t obj_idx)