[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 5 08:12:40 UTC 2021


 vcl/source/window/seleng.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 979aa2a49872176e45dcff2df50211a5dc28c4e0
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Fri Jul 5 12:40:16 2019 +0200
Commit:     Pranam Lashkari <lpranam at collabora.com>
CommitDate: Fri Feb 5 09:12:10 2021 +0100

    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 at cib.de>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110392
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

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;


More information about the Libreoffice-commits mailing list