Fix scrollbar position in wxListCtrl in wxUniv

Skip the event in wxGenericListCtrl::OnSize() to let wxUniv position the
window scrollbars correctly.

See https://github.com/wxWidgets/wxWidgets/pull/2512

Closes #19254.
This commit is contained in:
Vadim Zeitlin
2021-09-05 17:36:57 +02:00
parent bfd2d02b3e
commit 98c2eef619

View File

@@ -5628,7 +5628,7 @@ bool wxGenericListCtrl::SortItems( wxListCtrlCompare fn, wxIntPtr data )
// event handlers
// ----------------------------------------------------------------------------
void wxGenericListCtrl::OnSize(wxSizeEvent& WXUNUSED(event))
void wxGenericListCtrl::OnSize(wxSizeEvent& event)
{
if (!m_mainWin) return;
@@ -5644,6 +5644,8 @@ void wxGenericListCtrl::OnSize(wxSizeEvent& WXUNUSED(event))
m_mainWin->RecalculatePositionsAndRefresh();
AdjustScrollbars();
event.Skip();
}
void wxGenericListCtrl::OnInternalIdle()