summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4bd8710)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6537
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( coords != wxGridNoCellCoords )
{
if ( coords != wxGridNoCellCoords )
{
- if ( !IsSelection() )
- {
- SelectBlock( coords, coords );
- }
- else
- {
- SelectBlock( m_currentCellCoords, coords );
+ if ( event.ControlDown() )
+ {
+ if ( m_selectingKeyboard == wxGridNoCellCoords)
+ m_selectingKeyboard = coords;
+ SelectBlock ( m_selectingKeyboard, coords );
+ }
+ else
+ {
+ if ( !IsSelection() )
+ {
+ SelectBlock( coords, coords );
+ }
+ else
+ {
+ SelectBlock( m_currentCellCoords, coords );
+ }
}
if (! IsVisible(coords))
}
if (! IsVisible(coords))
- m_selection->ToggleCellSelection( coords.GetRow(),
- coords.GetCol(),
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
- m_selectingTopLeft = wxGridNoCellCoords;
- m_selectingBottomRight = wxGridNoCellCoords;
- SetCurrentCell( coords );
+ if ( event.ControlDown() )
+ {
+ m_selection->ToggleCellSelection( coords.GetRow(),
+ coords.GetCol(),
+ event.ControlDown(),
+ event.ShiftDown(),
+ event.AltDown(),
+ event.MetaDown() );
+ m_selectingTopLeft = wxGridNoCellCoords;
+ m_selectingBottomRight = wxGridNoCellCoords;
+ m_selectingKeyboard = coords;
+ }
+ else
+ SetCurrentCell( coords );
m_waitForSlowClick = TRUE;
}
}
m_waitForSlowClick = TRUE;
}
}
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SetCurrentCell( m_currentCellCoords.GetRow() - 1,
m_currentCellCoords.GetCol() );
SetCurrentCell( m_currentCellCoords.GetRow() - 1,
m_currentCellCoords.GetCol() );
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SetCurrentCell( m_currentCellCoords.GetRow() + 1,
m_currentCellCoords.GetCol() );
SetCurrentCell( m_currentCellCoords.GetRow() + 1,
m_currentCellCoords.GetCol() );
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SetCurrentCell( m_currentCellCoords.GetRow(),
m_currentCellCoords.GetCol() - 1 );
SetCurrentCell( m_currentCellCoords.GetRow(),
m_currentCellCoords.GetCol() - 1 );
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
- SetCurrentCell( m_currentCellCoords.GetRow(),
+ {
+ ClearSelection();
+ SetCurrentCell( m_currentCellCoords.GetRow(),
m_currentCellCoords.GetCol() + 1 );
m_currentCellCoords.GetCol() + 1 );
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
- SetCurrentCell( row, col );
-
+ {
+ ClearSelection();
+ SetCurrentCell( row, col );
+ }
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
- SetCurrentCell( row, col );
+ {
+ ClearSelection();
+ SetCurrentCell( row, col );
+ }
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
- SetCurrentCell( row, col );
+ {
+ ClearSelection();
+ SetCurrentCell( row, col );
+ }
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
- SetCurrentCell( row, col );
+ {
+ ClearSelection();
+ SetCurrentCell( row, col );
+ }