Don't generate wxEVT_COMMAND_DATAVIEW_CACHE_HINT for empty control.
Don't send any cache hint events for empty wxDataViewCtrl. Sending them was unnecessary, inconsistent with wxListCtrl (which doesn't send them when it's empty) and the events also had incorrect range. Just don't create them at all to avoid all these problems at once. Closes #13132. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
68f64b40bf
commit
da87ce5a36
@ -1597,6 +1597,12 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
dc.DrawRectangle(GetClientSize());
|
||||
#endif
|
||||
|
||||
if ( IsEmpty() )
|
||||
{
|
||||
// No items to draw.
|
||||
return;
|
||||
}
|
||||
|
||||
// prepare the DC
|
||||
GetOwner()->PrepareDC( dc );
|
||||
dc.SetFont( GetFont() );
|
||||
|
Loading…
Reference in New Issue
Block a user