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:
@@ -5634,7 +5634,7 @@ wxSize wxDataViewCtrl::GetSizeAvailableForScrollTarget(const wxSize& size)
|
|||||||
return newsize;
|
return newsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
|
void wxDataViewCtrl::OnSize(wxSizeEvent &event)
|
||||||
{
|
{
|
||||||
// We need to override OnSize so that our scrolled
|
// We need to override OnSize so that our scrolled
|
||||||
// window a) does call Layout() to use sizers for
|
// window a) does call Layout() to use sizers for
|
||||||
@@ -5661,6 +5661,7 @@ void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
|
|||||||
{
|
{
|
||||||
m_headerArea->Refresh();
|
m_headerArea->Refresh();
|
||||||
}
|
}
|
||||||
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDataViewCtrl::OnDPIChanged(wxDPIChangedEvent& event)
|
void wxDataViewCtrl::OnDPIChanged(wxDPIChangedEvent& event)
|
||||||
|
|||||||
@@ -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
|
if (m_targetWindow != this) // check whether initialisation has been done
|
||||||
{
|
{
|
||||||
// reposition our children windows
|
// reposition our children windows
|
||||||
CalcWindowSizes();
|
CalcWindowSizes();
|
||||||
|
event.Skip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user