diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-07-05 12:40:16 +0200 |
---|---|---|
committer | Pranam Lashkari <lpranam@collabora.com> | 2021-02-05 09:12:10 +0100 |
commit | 979aa2a49872176e45dcff2df50211a5dc28c4e0 (patch) | |
tree | ccb25657c103258085ee169c971de158a7273e2a | |
parent | 40b9beb175c896c6eb29644f92e07f59353b9eb7 (diff) |
Right clicking in text should move the cursor
Currently the cursor stays at the old position when you right click
in a different position in the text.
This causes some issues, e.g. when you right click on a hyperlink in
draw, you don't get the context menu for the link if the cursor is not
on the link (see tdf#98575 for related bug).
So generally, when right clicking on a piece of text, move the cursor
to where the click happened.
The new behavior is now matching the behavior of Word, PowerPoint, etc.
Change-Id: I5e0ac37b7ac6c859d3056c5b8ed453f97c747360
Reviewed-on: https://gerrit.libreoffice.org/75127
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110392
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r-- | vcl/source/window/seleng.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index e659db7a5875..d50a4d50b6ac 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -114,8 +114,8 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 ) bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { - nFlags &= (~SelectionEngineFlags::CMDEVT); - if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() ) + nFlags &= ~SelectionEngineFlags::CMDEVT; + if ( !pFunctionSet || rMEvt.GetClicks() > 1 ) return false; sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods; |