]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
Now we can build all tarballs on one (Unix shell) box using pre-flight.sh.
[wxWidgets.git] / src / generic / grid.cpp
index 4d76b9be45b69642f52731af86a0fc5badcc3661..698a97d8c8038dff10121cb632c499386a4a53a5 100644 (file)
@@ -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