]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
don't set virtual size of the window to (0, 0) if scrollbars are removed from it
[wxWidgets.git] / src / generic / grid.cpp
index 48ff5cf934eb196527c34fcb5a18bacbe3428c3a..47190211460c7e982582c7540dd204315a7c9a30 100644 (file)
@@ -552,7 +552,7 @@ void wxGridCellEditor::HandleReturn(wxKeyEvent& event)
 bool wxGridCellEditor::IsAcceptedKey(wxKeyEvent& event)
 {
     // accept the simple key presses, not anything with Ctrl/Alt/Meta
-    return !(event.ControlDown() || event.AltDown());
+    return !(event.ControlDown() || event.AltDown() || event.GetKeyCode() == WXK_SHIFT);
 }
 
 void wxGridCellEditor::StartingKey(wxKeyEvent& event)
@@ -10196,7 +10196,7 @@ wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft,
     }
     else
     {
-        rect = wxRect();
+        rect = wxRect(0,0,0,0);
     }
 
     cellRect = CellToRect( bottomRight );
@@ -10271,7 +10271,7 @@ wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft,
     m_gridWin->GetClientSize( &cw, &ch );
 
     if (right < 0 || bottom < 0 || left > cw || top > ch)
-        return wxRect();
+        return wxRect(0,0,0,0);
 
     rect.SetLeft( wxMax(0, left) );
     rect.SetTop( wxMax(0, top) );