Modified <shift>+arrow key behaviour so that the starting cell is
included in the selection git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
07e87221f6
commit
cb9fb5bb00
@ -6131,6 +6131,10 @@ bool wxGrid::MoveCursorUp( bool expandSelection )
|
||||
if ( m_currentCellCoords != wxGridNoCellCoords &&
|
||||
m_currentCellCoords.GetRow() > 0 )
|
||||
{
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
MakeCellVisible( m_currentCellCoords.GetRow() - 1,
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
@ -6149,11 +6153,13 @@ bool wxGrid::MoveCursorUp( bool expandSelection )
|
||||
|
||||
bool wxGrid::MoveCursorDown( bool expandSelection )
|
||||
{
|
||||
// TODO: allow for scrolling
|
||||
//
|
||||
if ( m_currentCellCoords != wxGridNoCellCoords &&
|
||||
m_currentCellCoords.GetRow() < m_numRows-1 )
|
||||
{
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
MakeCellVisible( m_currentCellCoords.GetRow() + 1,
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
@ -6175,6 +6181,10 @@ bool wxGrid::MoveCursorLeft( bool expandSelection )
|
||||
if ( m_currentCellCoords != wxGridNoCellCoords &&
|
||||
m_currentCellCoords.GetCol() > 0 )
|
||||
{
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
MakeCellVisible( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() - 1 );
|
||||
|
||||
@ -6196,6 +6206,10 @@ bool wxGrid::MoveCursorRight( bool expandSelection )
|
||||
if ( m_currentCellCoords != wxGridNoCellCoords &&
|
||||
m_currentCellCoords.GetCol() < m_numCols - 1 )
|
||||
{
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
MakeCellVisible( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() + 1 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user