sw/source/uibase/shells/drwbassh.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit dced115279b953735040663f71a2e848762672d7
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Thu Sep 15 12:12:31 2022 -0800
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Fri Sep 16 22:08:20 2022 +0200

    tdf#150589 Set cursor to better position after deleting a drawing
    
    object
    
    Cutting a drawing object involves SwWrtShell::DelRight which uses the
    drawing object's frame top-left point to set the cursor after
    deleting. Delete and Backspace do not use SwWrtShell::DelRight to
    delete a drawing object. This patch makes Delete and Backspace
    position the cursor like Cut after drawing object delete.
    
    Change-Id: I6dc07eccc8397393a230368a20b0589e6d57a89a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140036
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>

diff --git a/sw/source/uibase/shells/drwbassh.cxx 
b/sw/source/uibase/shells/drwbassh.cxx
index 766ca0ae81bb..71c66a046e7d 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -374,6 +374,8 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
             {
                 bDone = true;
 
+                const Point aPt = pSh->GetObjRect().TopLeft(); // tdf#150589
+
                 if( GetView().IsDrawRotate() )
                 {
                     pSh->SetDragMode( SdrDragMode::Move );
@@ -399,8 +401,10 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
                 if (pSh->IsSelFrameMode())
                 {
                     pSh->LeaveSelFrameMode();
-                    // #105852# FME
+                    // #105852# FME <- perhaps fixed by tdf#150589
+                    static_cast<SwEditShell*>(pSh)->SetCursor(aPt);
                 }
+
             }
             break;
 

Reply via email to