loleaflet/src/layer/tile/TileLayer.js |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 4342c5c9fbe313f3f4a10f9f8c7dc9019e7bb30f
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Sun May 31 14:02:29 2015 +0200

    Don't switch parts when we are in the correct one already.

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index b12dbe2..2c7e447 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -261,10 +261,13 @@ L.TileLayer = L.GridLayer.extend({
                        }
                }
                else if (textMsg.startsWith('setpart:')) {
-                       this._currentPart = parseInt(textMsg.match(/\d+/g)[0]);
-                       this._update();
-                       this._clearSelections();
-                       this._map.fire('setpart', {currentPart: 
this._currentPart});
+                       var part = parseInt(textMsg.match(/\d+/g)[0]);
+                       if (part != this._currentPart) {
+                               this._currentPart = part;
+                               this._update();
+                               this._clearSelections();
+                               this._map.fire('setpart', {currentPart: 
this._currentPart});
+                       }
                }
                else if (textMsg.startsWith('searchnotfound:')) {
                        this._map.fire('searchnotfound');
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to