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

Jan Holesovsky kendy at collabora.com
Fri Mar 17 11:27:41 UTC 2017


 desktop/source/lib/init.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 9eb05864a2262e841aff2bbf7d0825c9b326efa5
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Mar 17 12:21:34 2017 +0100

    lok: It's not that important to skip some of the messages.
    
    More important is always to perform the paint.
    
    Change-Id: I392dd6cea4a5f43a646fca04d284b365b5fb5b78

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 936ca6b554a0..fde12fcdf63a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1824,17 +1824,16 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
 
     // Disable callbacks while we are painting.
     LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis);
-    int nView = SfxLokHelper::getView();
-    if (nView < 0)
-        return;
+    const int nOrigViewId = doc_getView(pThis);
+
+    if (nOrigViewId >= 0)
+        pDocument->mpCallbackFlushHandlers[nOrigViewId]->setPartTilePainting(true);
 
-    pDocument->mpCallbackFlushHandlers[nView]->setPartTilePainting(true);
     try
     {
         // Text documents have a single coordinate system; don't change part.
         int nOrigPart = 0;
         const bool isText = (doc_getDocumentType(pThis) == LOK_DOCTYPE_TEXT);
-        int nOrigViewId = doc_getView(pThis);
         int nViewId = nOrigViewId;
         if (!isText)
         {
@@ -1878,7 +1877,8 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
         // Nothing to do but restore the PartTilePainting flag.
     }
 
-    pDocument->mpCallbackFlushHandlers[nView]->setPartTilePainting(false);
+    if (nOrigViewId >= 0)
+        pDocument->mpCallbackFlushHandlers[nOrigViewId]->setPartTilePainting(false);
 }
 
 static int doc_getTileMode(LibreOfficeKitDocument* /*pThis*/)


More information about the Libreoffice-commits mailing list