mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-04 02:38:05 -05: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:
1 parent
2d29b7d6cd
commit
48a94ebae1
3 files changed
+4
-8
No files matched your search
@@ -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