]> git.saurik.com Git - wxWidgets.git/commitdiff
implemented EVT_LIST_CACHE_HINT support: send this message from OnPaint() now
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 20 Jul 2001 11:12:34 +0000 (11:12 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 20 Jul 2001 11:12:34 +0000 (11:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 1b48ff05de8ce4cde5b9a669c88e18909f9576e0..8ea0eada4e4197f1175b451e2f7a822802903929 100644 (file)
@@ -2482,6 +2482,13 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
         wxCoord xOrig, yOrig;
         CalcUnscrolledPosition(0, 0, &xOrig, &yOrig);
 
         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);
         for ( size_t line = visibleFrom; line <= visibleTo; line++ )
         {
             rectLine = GetLineRect(line);