]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
dropTarget is now dynamically allocated.
[wxWidgets.git] / src / generic / grid.cpp
index 65a3603c05aef9ecabc2a4567fcb6691c02b061e..2a8075f2267de94d2cb8172ba436324531483d47 100644 (file)
@@ -7665,7 +7665,17 @@ void wxGrid::SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol )
 {
     int temp;
     wxGridCellCoords updateTopLeft, updateBottomRight;
-
+    
+    if ( m_selection->GetSelectionMode() == wxGrid::wxGridSelectRows )
+    {
+        leftCol = 0;
+        rightCol = GetNumberCols() - 1;
+    }
+    else if ( m_selection->GetSelectionMode() == wxGrid::wxGridSelectColumns )
+    {
+        topRow = 0;
+        bottomRow = GetNumberRows() - 1;
+    }
     if ( topRow > bottomRow )
     {
         temp = topRow;