mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-15 07:32:39 -07:00
Fixed scroll the Object List to selected item on OSX & GTK
+ fixed #1395 (maximum PresetComboBox's width limit on Ubuntu)
This commit is contained in:
@@ -1459,13 +1459,11 @@ void ObjectList::update_selections()
|
||||
|
||||
select_items(sels);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
if (GetSelection()) {
|
||||
const int sel_item_row = GetRowByItem(GetSelection());
|
||||
ScrollLines(sel_item_row - m_selected_row);
|
||||
m_selected_row = sel_item_row;
|
||||
const wxRect& top_rc = GetItemRect(GetTopItem());
|
||||
const wxRect& sel_rc = GetItemRect(GetSelection());
|
||||
ScrollLines(int((sel_rc.y - top_rc.y) / top_rc.GetHeight()) - 0.5*GetCountPerPage());
|
||||
}
|
||||
#endif //__WXMSW__
|
||||
}
|
||||
|
||||
void ObjectList::update_selections_on_canvas()
|
||||
|
||||
Reference in New Issue
Block a user