sw/source/uibase/docvw/edtwin.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit df4585686eb56d95a871dd528ad06fd980a58591
Author:     Justin Luth <jl...@mail.com>
AuthorDate: Wed Jun 17 09:00:33 2020 +0300
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Wed Jun 17 13:49:08 2020 +0200

    tdf#134023 sw ui: stay at footer ONLY when showing control
    
    This adds a missing piece to LO 6.4's
    commit 342a5890dbcddccb4013e201e3ff3d9e6967e733
    
    That tdf#84929 commit message suggested:
      One additional limitation could be added to only apply this
      if it is dealing with the footer, since in the case of a
      header there would be no screen-jump.
    
    and this bug report shows why that is necessary.
    I'm not sure why I didn't apply that immediately.
    Perhaps to help identify situations where the entire
    concept might be bad?
    
    Change-Id: Icea861bec45262eed88c38bb7eea910289c06870
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96487
    Tested-by: Justin Luth <justin_l...@sil.org>
    Reviewed-by: Justin Luth <justin_l...@sil.org>
    (cherry picked from commit c3cf3e908add6b6617eb0ee12385fbd8a70a9887)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96494
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index dda54d5ae71e..507919f601d7 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2821,10 +2821,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& 
_rMEvt)
                     // Repaint everything
                     Invalidate();
 
-                    // If the control had not been showing, do not return to 
the cursor position,
+                    // tdf#84929. If the footer control had not been showing, 
do not change the cursor position,
                     // because the user may have scrolled to turn on the 
separator control and
-                    // if the cursor is now off-screen, then the user would 
need to scroll back again to use the control.
-                    if ( !bSeparatorWasVisible && 
rSh.GetViewOptions()->IsUseHeaderFooterMenu() && 
!Application::IsHeadlessModeEnabled() )
+                    // if the cursor cannot be positioned on-screen, then the 
user would need to scroll back again to use the control.
+                    // This should only be done for the footer. The cursor can 
always be re-positioned near the header. tdf#134023.
+                    if ( eControl == FrameControlType::Footer && 
!bSeparatorWasVisible
+                         && rSh.GetViewOptions()->IsUseHeaderFooterMenu() && 
!Application::IsHeadlessModeEnabled() )
                         return;
                 }
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to