X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca65c0440a7163e4e37e48b1c4329709d722db47..b16de7461ac6d97b0b04a5ce4e73447925e93416:/src/generic/gridsel.cpp diff --git a/src/generic/gridsel.cpp b/src/generic/gridsel.cpp index 317b5038e1..f1d62b07f6 100644 --- a/src/generic/gridsel.cpp +++ b/src/generic/gridsel.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "gridsel.h" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -91,7 +87,7 @@ bool wxGridSelection::IsInSelection ( int row, int col ) // (unless we are in column selection mode). if ( m_selectionMode != wxGrid::wxGridSelectColumns ) { - size_t count = m_rowSelection.GetCount(); + count = m_rowSelection.GetCount(); for ( size_t n = 0; n < count; n++ ) { if ( row == m_rowSelection[n] ) @@ -104,7 +100,7 @@ bool wxGridSelection::IsInSelection ( int row, int col ) // (unless we are in row selection mode). if ( m_selectionMode != wxGrid::wxGridSelectRows ) { - size_t count = m_colSelection.GetCount(); + count = m_colSelection.GetCount(); for ( size_t n = 0; n < count; n++ ) { if ( col == m_colSelection[n] ) @@ -443,14 +439,17 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol, coords2.GetRow(), coords2.GetCol(), topRow, leftCol, bottomRow, rightCol ) ) { - case 1: - return; - case -1: - m_blockSelectionTopLeft.RemoveAt(n); - m_blockSelectionBottomRight.RemoveAt(n); - n--; count--; - default: - ; + case 1: + return; + + case -1: + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + n--; count--; + break; + + default: + break; } } @@ -465,13 +464,16 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol, m_rowSelection[n], m_grid->GetNumberCols()-1, topRow, leftCol, bottomRow, rightCol ) ) { - case 1: - return; - case -1: - m_rowSelection.RemoveAt(n); - n--; count--; - default: - ; + case 1: + return; + + case -1: + m_rowSelection.RemoveAt(n); + n--; count--; + break; + + default: + break; } } } @@ -484,13 +486,16 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol, m_grid->GetNumberRows()-1, m_colSelection[n], topRow, leftCol, bottomRow, rightCol ) ) { - case 1: - return; - case -1: - m_colSelection.RemoveAt(n); - n--; count--; - default: - ; + case 1: + return; + + case -1: + m_colSelection.RemoveAt(n); + n--; count--; + break; + + default: + break; } } } @@ -590,8 +595,8 @@ void wxGridSelection::ToggleCellSelection( int row, int col, count = m_cellSelection.GetCount(); for ( n = 0; n < count; n++ ) { - wxGridCellCoords& coords = m_cellSelection[n]; - if ( row == coords.GetRow() && col == coords.GetCol() ) + const wxGridCellCoords& sel = m_cellSelection[n]; + if ( row == sel.GetRow() && col == sel.GetCol() ) { wxGridCellCoords coords = m_cellSelection[n]; m_cellSelection.RemoveAt(n); @@ -807,6 +812,9 @@ void wxGridSelection::ClearSelection() { r = m_grid->BlockToDeviceRect( coords1, coords1 ); ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif } } } @@ -823,6 +831,9 @@ void wxGridSelection::ClearSelection() { r = m_grid->BlockToDeviceRect( coords1, coords2 ); ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif } } @@ -839,6 +850,9 @@ void wxGridSelection::ClearSelection() r = m_grid->BlockToDeviceRect( wxGridCellCoords( row, 0 ), wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ) ); ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif } } } @@ -856,6 +870,9 @@ void wxGridSelection::ClearSelection() r = m_grid->BlockToDeviceRect( wxGridCellCoords( 0, col ), wxGridCellCoords( m_grid->GetNumberRows() - 1, col ) ); ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif } } }