[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jul 30 14:42:50 UTC 2018


 sw/source/uibase/uiview/view2.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 6ee3d32494e165b11a416637a91cf4fc69af5432
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Jul 26 13:12:31 2018 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Jul 30 16:42:27 2018 +0200

    tdf#106374: lock view when updating index
    
    Change-Id: I745f8b66cb79c8738dba6fcdd58b8597e604f6fd
    Reviewed-on: https://gerrit.libreoffice.org/58091
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index c71011b737a4..f1866fc3ee16 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -906,11 +906,16 @@ void SwView::Execute(SfxRequest &rReq)
             const SwTOXBase* pBase = m_pWrtShell->GetCurTOX();
             if(pBase)
             {
+                // tdf#106374: don't jump view on the update
+                const bool bWasLocked = m_pWrtShell->IsViewLocked();
+                m_pWrtShell->LockView(true);
                 m_pWrtShell->StartAction();
                 if(TOX_INDEX == pBase->GetType())
                     m_pWrtShell->ApplyAutoMark();
                 m_pWrtShell->UpdateTableOf( *pBase );
                 m_pWrtShell->EndAction();
+                if (!bWasLocked)
+                    m_pWrtShell->LockView(false);
             }
         }
         break;


More information about the Libreoffice-commits mailing list