From 64c5ec5bbc5e12e92499fdd50f192eea468ea54a Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sun, 20 Jan 2019 16:44:28 -0500 Subject: [PATCH] wsd: don't warn incorrectly when selecting current part Change-Id: I3c872469911b1f232e40cc110859402fc0814f3a Reviewed-on: https://gerrit.libreoffice.org/69640 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian Reviewed-on: https://gerrit.libreoffice.org/71104 --- kit/ChildSession.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 {