mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06: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:
parent
2d29b7d6cd
commit
48a94ebae1
3 changed files with 4 additions and 8 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue