[Libreoffice-commits] online.git: loleaflet/src

Ashod Nakashian ashod.nakashian at collabora.co.uk
Thu May 5 11:39:55 UTC 2016


 loleaflet/src/layer/tile/WriterTileLayer.js |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 376b36b4c8a3b28d18e89c854ab491737177fa85
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Thu May 5 07:22:43 2016 -0400

    loleaflet: writer shouldn't signal page change when nothing changed
    
    Change-Id: I1393f0c385f75c07d2024c7045d04eabc6937718
    Reviewed-on: https://gerrit.libreoffice.org/24677
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js
index ee7b815..a42b67d 100644
--- a/loleaflet/src/layer/tile/WriterTileLayer.js
+++ b/loleaflet/src/layer/tile/WriterTileLayer.js
@@ -100,12 +100,14 @@ L.WriterTileLayer = L.TileLayer.extend({
 
 	_onSetPartMsg: function (textMsg) {
 		var part = parseInt(textMsg.match(/\d+/g)[0]);
-		this._currentPage = part;
-		this._map.fire('pagenumberchanged', {
-			currentPage: part,
-			pages: this._pages,
-			docType: this._docType
-		});
+		if (part !== this._selectedPart) {
+			this._currentPage = part;
+			this._map.fire('pagenumberchanged', {
+				currentPage: part,
+				pages: this._pages,
+				docType: this._docType
+			});
+		}
 	},
 
 	_onStatusMsg: function (textMsg) {


More information about the Libreoffice-commits mailing list