Fix scrollbar position in wxGrid and wxDataViewCtrl in wxUniv

Skip the event in wxEVT_SIZE handler in wxGrid and wxDataViewCtrl as it
was already done for wxListCtrl in 98c2eef619 (Fix scrollbar position in
wxListCtrl in wxUniv, 2021-09-05).

Closes #22145.
This commit is contained in:
Kvaz1r
2022-02-20 12:17:41 +02:00
committed by Vadim Zeitlin
parent 6d0f5ec591
commit 1d585eef05
2 changed files with 4 additions and 2 deletions

View File

@@ -5746,12 +5746,13 @@ void wxGrid::RefreshBlock(int topRow, int leftCol,
}
}
void wxGrid::OnSize(wxSizeEvent& WXUNUSED(event))
void wxGrid::OnSize(wxSizeEvent& event)
{
if (m_targetWindow != this) // check whether initialisation has been done
{
// reposition our children windows
CalcWindowSizes();
event.Skip();
}
}