From 36b7e3a2ec660d16923df438a99d87dd4550fdea Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Fri, 24 Sep 2010 17:44:20 +0000 Subject: [PATCH] Correct empty space drawing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/propgrid.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 3840896..d1dbf3d 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -1945,6 +1945,7 @@ void wxPropertyGrid::DrawItems( wxDC& dc, vx *= wxPG_PIXELS_PER_UNIT; vy *= wxPG_PIXELS_PER_UNIT; + // itemRect is in virtual grid space wxRect drawRect(itemsRect->x - vx, itemsRect->y - vy, itemsRect->width, @@ -1985,8 +1986,9 @@ void wxPropertyGrid::DrawItems( wxDC& dc, if ( dcPtr ) { + // paintFinishY and drawBottomY are in buffer/physical space paintFinishY = DoDrawItems( *dcPtr, itemsRect, isBuffered ); - int drawBottomY = itemsRect->y + itemsRect->height; + int drawBottomY = itemsRect->y + itemsRect->height - vy; // Clear area beyond last painted property if ( paintFinishY < drawBottomY ) -- 2.7.4