[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src

Pranam Lashkari (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 29 08:16:32 UTC 2020


 loleaflet/src/control/Control.PartsPreview.js |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 8a4b48dd770badce2d597f9a3548b18bfe4d2e41
Author:     Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Mon Jun 29 15:03:05 2020 +0530
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jul 29 10:16:12 2020 +0200

    leaflet: prevent losing selection while dragging multiple slides
    
    Change-Id: Ia7dca36495d802f2c55648cf0a33ae8d71124d64
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99598
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index ff510b7c2..2a0efecdd 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -497,8 +497,11 @@ L.Control.PartsPreview = L.Control.extend({
 		var part = $(this.partsPreview._partsPreviewCont).find('.mCSB_container .preview-frame').index(e.target.parentNode);
 		if (part !== null) {
 			var partId = parseInt(part) - 1; // The first part is just a drop-site for reordering.
-			this.partsPreview._map.setPart(partId);
-			this.partsPreview._map.selectPart(partId, 1, false); // And select.
+			if (this.partsPreview._map._docLayer && !this.partsPreview._map._docLayer._selectedParts.includes(partId))
+			{
+				this.partsPreview._map.setPart(partId);
+				this.partsPreview._map.selectPart(partId, 1, false); // And select.
+			}
 		}
 		// By default we move when dragging, but can
 		// support duplication with ctrl in the future.


More information about the Libreoffice-commits mailing list