mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
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:
parent
7e8d9c154d
commit
825f3641e2
4 changed files with 60 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue