From: Vadim Zeitlin Date: Fri, 20 Jul 2001 11:12:34 +0000 (+0000) Subject: implemented EVT_LIST_CACHE_HINT support: send this message from OnPaint() now X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ff3d11a0ab976879ff87c826f660786fee172ed9?ds=inline 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 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 1b48ff05de..8ea0eada4e 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2482,6 +2482,13 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) wxCoord 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++ ) { rectLine = GetLineRect(line);