summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-28 13:45:42 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-28 13:45:42 +0200
commitf1004e137767c4fc7f6b36422bcf4f7a2d41a94a (patch)
tree39c680d6c93c0453cc50ab564891d4d12de94f31 /svtools
parent2e090359ecde00a6e47e3d782b2ecb2ddd6984e6 (diff)
gridfixes: fixed selection handling, part I: RowSelection::HandleMouseDown: always forward to the SelectionEngine, even if the hit row is already selected. This ensures proper de-selection handling in case of Ctrl+Click
Diffstat (limited to 'svtools')
-rwxr-xr-xsvtools/source/table/mousefunction.cxx19
1 files changed, 3 insertions, 16 deletions
diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx
index 20d505e911e9..162abc7936c8 100755
--- a/svtools/source/table/mousefunction.cxx
+++ b/svtools/source/table/mousefunction.cxx
@@ -207,27 +207,14 @@ namespace svt { namespace table
TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) );
if ( tableCell.nRow >= 0 )
{
- bool bSetCursor = false;
if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION )
{
- bSetCursor = true;
+ i_tableControl.activateCell( tableCell.nColumn, tableCell.nRow );
+ handled = true;
}
else
{
- if ( !i_tableControl.isRowSelected( tableCell.nRow ) )
- {
- handled = i_tableControl.getSelEngine()->SelMouseButtonDown( i_event );
- }
- else
- {
- bSetCursor = true;
- }
- }
-
- if ( bSetCursor )
- {
- i_tableControl.activateCell( tableCell.nColumn, tableCell.nRow );
- handled = true;
+ handled = i_tableControl.getSelEngine()->SelMouseButtonDown( i_event );
}
}