]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
Instead of having wxComboCtrl mimic wxTextEntry interface, make it actually inherit...
[wxWidgets.git] / src / generic / grid.cpp
index d60b2c579d4ae8c83676d196c2b75e344e9ad2fc..d9a1a800d405b41fec1108856042c81f9e9e9545 100644 (file)
@@ -4859,6 +4859,9 @@ void
 wxGrid::UpdateBlockBeingSelected(int topRow, int leftCol,
                                  int bottomRow, int rightCol)
 {
+    MakeCellVisible(m_selectedBlockCorner);
+    m_selectedBlockCorner = wxGridCellCoords(bottomRow, rightCol);
+
     if ( m_selection )
     {
         switch ( m_selection->GetSelectionMode() )
@@ -4895,9 +4898,6 @@ wxGrid::UpdateBlockBeingSelected(int topRow, int leftCol,
         }
     }
 
-    m_selectedBlockCorner = wxGridCellCoords(bottomRow, rightCol);
-    MakeCellVisible(m_selectedBlockCorner);
-
     EnsureFirstLessThanSecond(topRow, bottomRow);
     EnsureFirstLessThanSecond(leftCol, rightCol);
 
@@ -6281,7 +6281,9 @@ int wxGrid::PosToEdgeOfLine(int pos, const wxGridOperations& oper) const
         else if ( line > 0 &&
                     pos - oper.GetLineStartPos(this,
                                                line) < WXGRID_LABEL_EDGE_ZONE )
-            return line - 1;
+        {
+            return oper.GetLineBefore(this, line);
+        }
     }
 
     return -1;