From 6f706ee0a3fcd3d9366b9f31cb17a596339e6a67 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 2 Jul 2006 01:35:01 +0000 Subject: [PATCH] fix appearance problems when the cell is scrolled (patch 1515458) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 4d76b9be45..698a97d8c8 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -8173,13 +8173,6 @@ void wxGrid::ShowCellEditControl() m_currentCellCoords.SetCol( col ); } - // convert to scrolled coords - CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); - - int nXMove = 0; - if (rect.x < 0) - nXMove = rect.x; - // erase the highlight and the cell contents because the editor // might not cover the entire cell wxClientDC dc( m_gridWin ); @@ -8188,6 +8181,13 @@ void wxGrid::ShowCellEditControl() dc.SetPen(*wxTRANSPARENT_PEN); dc.DrawRectangle(rect); + // convert to scrolled coords + CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + + int nXMove = 0; + if (rect.x < 0) + nXMove = rect.x; + // cell is shifted by one pixel // However, don't allow x or y to become negative // since the SetSize() method interprets that as -- 2.45.2