From 98c2eef619fcf8837c2de578fe7a5d1f7d61876c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Sep 2021 17:36:57 +0200 Subject: [PATCH] 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. --- src/generic/listctrl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index ab337f337f..974def6d83 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -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()