[Libreoffice-commits] online.git: kit/ChildSession.cpp

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Sat Aug 17 02:44:48 UTC 2019


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

New commits:
commit 64c5ec5bbc5e12e92499fdd50f192eea468ea54a
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: Sat Aug 17 04:44:29 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>
    Reviewed-on: https://gerrit.libreoffice.org/71104

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index b044adeba..fadbca1ea 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1956,14 +1956,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