Created GetRowByItem() to fix the Scrolling of the Object List to selected item under all platforms

+ temporary suppressed object/part mane editing under OSX
This commit is contained in:
YuSanka 2018-12-17 12:46:36 +01:00
parent 7e8d9c154d
commit 825f3641e2
4 changed files with 60 additions and 9 deletions

View file

@ -1460,12 +1460,9 @@ void ObjectList::update_selections()
select_items(sels);
if (GetSelection()) {
const wxRect& sel_rc = GetItemRect(GetSelection());
if (!sel_rc.IsEmpty()) {
const int rc_h = sel_rc.height;
const int displ = GetMainWindow()->GetClientRect().GetHeight()/(2*rc_h)+1;
ScrollLines(int(sel_rc.y / rc_h - displ));
}
const int sel_item_row = m_objects_model->GetRowByItem(GetSelection());
ScrollLines(sel_item_row - m_selected_row);
m_selected_row = sel_item_row;
}
}