]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
Make wxTLW::Raise() actually bring the window to the top
[wxWidgets.git] / src / generic / grid.cpp
index dad21398221503e1a43ab6a480c74c216de3b4d1..48ff5cf934eb196527c34fcb5a18bacbe3428c3a 100644 (file)
@@ -7524,6 +7524,16 @@ void wxGrid::ForceRefresh()
     EndBatch();
 }
 
+bool wxGrid::Enable(bool enable)
+{
+    if ( !wxScrolledWindow::Enable(enable) )
+        return false;
+
+    // redraw in the new state
+    m_gridWin->Refresh();
+
+    return true;
+}
 
 //
 // ------ Edit control functions
@@ -10186,7 +10196,7 @@ wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft,
     }
     else
     {
-        rect = wxRect( 0, 0, 0, 0 );
+        rect = wxRect();
     }
 
     cellRect = CellToRect( bottomRight );
@@ -10261,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( 0, 0, 0, 0);
+        return wxRect();
 
     rect.SetLeft( wxMax(0, left) );
     rect.SetTop( wxMax(0, top) );