]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
fix another logical/physical coords confusion and update the comment to help with...
[wxWidgets.git] / src / generic / grid.cpp
index a5978ae75d7a6108e334f5c6d40bbbe07992da11..02bd4d126acebb98824e52f895a595d55c034bf4 100644 (file)
@@ -3830,15 +3830,6 @@ void wxGridStringTable::SetValue( int row, int col, const wxString& value )
     m_data[row][col] = value;
 }
 
-bool wxGridStringTable::IsEmptyCell( int row, int col )
-{
-    wxCHECK_MSG( (row < GetNumberRows()) && (col < GetNumberCols()),
-                 true,
-                  _T("invalid row or column index in wxGridStringTable") );
-
-    return (m_data[row][col] == wxEmptyString);
-}
-
 void wxGridStringTable::Clear()
 {
     int row, col;
@@ -4208,7 +4199,8 @@ void wxGridRowLabelWindow::OnMouseEvent( wxMouseEvent& event )
 
 void wxGridRowLabelWindow::OnMouseWheel( wxMouseEvent& event )
 {
-    m_owner->GetEventHandler()->ProcessEvent( event );
+    if (!m_owner->GetEventHandler()->ProcessEvent( event ))
+        event.Skip();
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -4258,7 +4250,8 @@ void wxGridColLabelWindow::OnMouseEvent( wxMouseEvent& event )
 
 void wxGridColLabelWindow::OnMouseWheel( wxMouseEvent& event )
 {
-    m_owner->GetEventHandler()->ProcessEvent( event );
+    if (!m_owner->GetEventHandler()->ProcessEvent( event ))
+        event.Skip();
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -4294,7 +4287,8 @@ void wxGridCornerLabelWindow::OnMouseEvent( wxMouseEvent& event )
 
 void wxGridCornerLabelWindow::OnMouseWheel( wxMouseEvent& event )
 {
-    m_owner->GetEventHandler()->ProcessEvent(event);
+    if (!m_owner->GetEventHandler()->ProcessEvent(event))
+        event.Skip();
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -4360,7 +4354,8 @@ void wxGridWindow::OnMouseEvent( wxMouseEvent& event )
 
 void wxGridWindow::OnMouseWheel( wxMouseEvent& event )
 {
-    m_owner->GetEventHandler()->ProcessEvent( event );
+    if (!m_owner->GetEventHandler()->ProcessEvent( event ))
+        event.Skip();
 }
 
 // This seems to be required for wxMotif/wxGTK otherwise the mouse
@@ -4520,6 +4515,9 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id,
 
 wxGrid::~wxGrid()
 {
+    if ( m_winCapture )
+        m_winCapture->ReleaseMouse();
+
     // Ensure that the editor control is destroyed before the grid is,
     // otherwise we crash later when the editor tries to do something with the
     // half destroyed grid
@@ -6168,8 +6166,7 @@ void wxGrid::ChangeCursorMode(CursorMode mode,
 
     if ( m_winCapture )
     {
-        if (m_winCapture->HasCapture())
-            m_winCapture->ReleaseMouse();
+        m_winCapture->ReleaseMouse();
         m_winCapture = NULL;
     }
 
@@ -6396,8 +6393,7 @@ wxGrid::DoGridCellLeftUp(wxMouseEvent& event, const wxGridCellCoords& coords)
     {
         if (m_winCapture)
         {
-            if (m_winCapture->HasCapture())
-                m_winCapture->ReleaseMouse();
+            m_winCapture->ReleaseMouse();
             m_winCapture = NULL;
         }
 
@@ -9038,7 +9034,7 @@ bool wxGrid::MovePageUp()
 bool wxGrid::MovePageDown()
 {
     return DoMoveCursorByPage(
-                wxGridForwardOperations(this, wxGridColumnOperations()));
+                wxGridForwardOperations(this, wxGridRowOperations()));
 }
 
 // helper of DoMoveCursorByBlock(): advance the cell coordinates using diroper