kit/ChildSession.cpp                          |    2 +-
 loleaflet/src/control/Control.PartsPreview.js |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 0a54b23251eaae201e198366190c8525bf23d038
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Wed Aug 26 22:53:37 2020 +0530
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Wed Sep 2 10:41:33 2020 +0200

    leaflet: wsd: select the page before opening the slide wizard
    
    problem:
    In the mobile view taping on the selected slide preview would open the 
wizard
    but when some object is selected on the slide
    wizard would open for that object
    this patch helps us to set the Page as selection and as result
    mobile wizard opens for the slide even when some object on slide is selected
    
    Change-Id: Ia4f0d5fe6a4d82d101ee26b75f557a44e0627704
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101422
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 7eba3aa19..bae3cce4f 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -2146,7 +2146,7 @@ bool ChildSession::setClientPart(const char* /*buffer*/, 
int /*length*/, const S
 
     getLOKitDocument()->setView(_viewId);
 
-    if (getLOKitDocument()->getDocumentType() != LOK_DOCTYPE_TEXT && part != 
getLOKitDocument()->getPart())
+    if (getLOKitDocument()->getDocumentType() != LOK_DOCTYPE_TEXT)
     {
         getLOKitDocument()->setPart(part);
     }
diff --git a/loleaflet/src/control/Control.PartsPreview.js 
b/loleaflet/src/control/Control.PartsPreview.js
index e529fad22..58408b48f 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -225,7 +225,8 @@ L.Control.PartsPreview = L.Control.extend({
                                var partId = parseInt(part) - 1; // The first 
part is just a drop-site for reordering.
                        if (!window.mode.isDesktop() && partId === 
this._map._docLayer._selectedPart) {
                                // if mobile or tab then second tap will open 
the mobile wizard
-                               if (this._map._permission === 'edit') {
+                               if (this._map.isPermissionEdit()) {
+                                       this._setPart(e);
                                        setTimeout(function () {
                                                
w2ui['actionbar'].click('mobile_wizard');
                                        }, 0);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to