implemented EVT_LIST_CACHE_HINT support: send this message from OnPaint() now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2482,6 +2482,13 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||||||
wxCoord xOrig, yOrig;
|
wxCoord xOrig, yOrig;
|
||||||
CalcUnscrolledPosition(0, 0, &xOrig, &yOrig);
|
CalcUnscrolledPosition(0, 0, &xOrig, &yOrig);
|
||||||
|
|
||||||
|
// tell the caller cache to cache the data
|
||||||
|
wxListEvent evCache(wxEVT_COMMAND_LIST_CACHE_HINT, GetParent()->GetId());
|
||||||
|
evCache.SetEventObject( GetParent() );
|
||||||
|
evCache.m_oldItemIndex = visibleFrom;
|
||||||
|
evCache.m_itemIndex = visibleTo;
|
||||||
|
GetParent()->GetEventHandler()->ProcessEvent( evCache );
|
||||||
|
|
||||||
for ( size_t line = visibleFrom; line <= visibleTo; line++ )
|
for ( size_t line = visibleFrom; line <= visibleTo; line++ )
|
||||||
{
|
{
|
||||||
rectLine = GetLineRect(line);
|
rectLine = GetLineRect(line);
|
||||||
|
Reference in New Issue
Block a user