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

Jan Holesovsky kendy at collabora.com
Fri Mar 17 11:35:29 UTC 2017


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

New commits:
commit 3d67719edab741d1a62a3efd2c4e6019957725e1
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 5d0dfc28d688..935bc45dadd5 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1826,17 +1826,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)
         {
@@ -1880,7 +1879,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