Kaydet (Commit) dd0431a5 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud Kaydeden (comit) Miklos Vajna

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/549Reviewed-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
Tested-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
üst a1f695de
......@@ -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 );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment