diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2020-08-26 22:53:37 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-09-02 10:41:33 +0200 |
commit | 0a54b23251eaae201e198366190c8525bf23d038 (patch) | |
tree | 0ca864b4adb969ad79b10d52709dcd3e95140519 | |
parent | 9c55d2d5b918c27a30859c152c102f944b2ba612 (diff) |
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 <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | kit/ChildSession.cpp | 2 | ||||
-rw-r--r-- | loleaflet/src/control/Control.PartsPreview.js | 3 |
2 files changed, 3 insertions, 2 deletions
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); |