[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - kit/ChildSession.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Apr 15 03:04:18 UTC 2019


 kit/ChildSession.cpp |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 3b931560b945c25bb820ba0b24dab7d229f3336b
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Jan 20 16:44:28 2019 -0500
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Mon Apr 15 05:03:58 2019 +0200

    wsd: don't warn incorrectly when selecting current part
    
    Change-Id: I3c872469911b1f232e40cc110859402fc0814f3a
    Reviewed-on: https://gerrit.libreoffice.org/69640
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 1e3e00413..91398619a 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1844,14 +1844,17 @@ bool ChildSession::selectClientPart(const char* /*buffer*/, int /*length*/, cons
 
     getLOKitDocument()->setView(_viewId);
 
-    if (getLOKitDocument()->getDocumentType() != LOK_DOCTYPE_TEXT && nPart != getLOKitDocument()->getPart())
+    if (getLOKitDocument()->getDocumentType() != LOK_DOCTYPE_TEXT)
     {
-        getLOKitDocument()->selectPart(nPart, nSelect);
+        if (nPart != getLOKitDocument()->getPart())
+        {
+            getLOKitDocument()->selectPart(nPart, nSelect);
 
-        // Notify the client of the selection update.
-        const std::string status = LOKitHelper::documentStatus(getLOKitDocument()->get());
-        if (!status.empty())
-            return sendTextFrame("statusupdate: " + status);
+            // Notify the client of the selection update.
+            const std::string status = LOKitHelper::documentStatus(getLOKitDocument()->get());
+            if (!status.empty())
+                return sendTextFrame("statusupdate: " + status);
+        }
     }
     else
     {


More information about the Libreoffice-commits mailing list