diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-03 14:37:31 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-09-14 07:48:39 +0000 |
commit | dd0431a537ea6f042dcb476000e230fe144c6114 (patch) | |
tree | 510243ec6a0285006014745e3d4c411a006087ea /svtools | |
parent | a1f695dea516dfb7199390f750ca8744bb7df912 (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
Change-Id: I46fd63332101fd078c6341c94575dc69f48f8a68
Reviewed-on: https://gerrit.libreoffice.org/549
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/table/mousefunction.cxx | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index 83d72124e92c..8e400a52e0dc 100644 --- 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 ); } } |