loleaflet/src/layer/tile/WriterTileLayer.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
New commits: commit 376b36b4c8a3b28d18e89c854ab491737177fa85 Author: Ashod Nakashian <[email protected]> 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 <[email protected]> Tested-by: Ashod Nakashian <[email protected]> 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) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
