Refresh the generic wxDataViewCtrl header if it was made too small.
Although normally the control header is not supposed to be resized below its minimal vertical size, sometimes this can still happen and in this case ugly artefacts were displayed because it wasn't refreshed properly. Do refresh it to avoid them. Closes #13313. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4025,6 +4025,16 @@ void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
|
|||||||
Layout();
|
Layout();
|
||||||
|
|
||||||
AdjustScrollbars();
|
AdjustScrollbars();
|
||||||
|
|
||||||
|
// We must redraw the headers if their height changed. Normally this
|
||||||
|
// shouldn't happen as the control shouldn't let itself be resized beneath
|
||||||
|
// its minimal height but avoid the display artefacts that appear if it
|
||||||
|
// does happen, e.g. because there is really not enough vertical space.
|
||||||
|
if ( !HasFlag(wxDV_NO_HEADER) && m_headerArea &&
|
||||||
|
m_headerArea->GetSize().y <= m_headerArea->GetBestSize(). y )
|
||||||
|
{
|
||||||
|
m_headerArea->Refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDataViewCtrl::SetFocus()
|
void wxDataViewCtrl::SetFocus()
|
||||||
|
Reference in New Issue
Block a user