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

New commits:
commit 169fb52a4bc5c427baa672630de5ce920d632664
Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk>
Date:   Sun Aug 21 11:15:16 2016 -0400

    loleaflet: remove view selection when closed
    
    Change-Id: Ia822a00bab13be12e327aee936ed9fb0d3d211b0
    Reviewed-on: https://gerrit.libreoffice.org/28303
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 3ff8e0e..4bf102c 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -658,12 +658,17 @@ L.TileLayer = L.GridLayer.extend({
                textMsg = textMsg.substring('remview:'.length + 1);
                var viewId = parseInt(textMsg);
 
-               // Ignore if viewid is same as ours
+               // Couldn't be ours, now could it?!
                if (viewId === this._viewId) {
                        return;
                }
 
-               // Just remove the view and update (to refresh as needed).
+               // Remove selection, if any.
+               if (this._viewSelections[viewId]) {
+                       
this._viewSelectionsGroup.removeLayer(this._viewSelections[viewId]);
+               }
+
+               // Remove the view and update (to refresh as needed).
                if (typeof this._viewCursors[viewId] !== 'undefined') {
                        this._viewCursors[viewId].visible = false;
                        this._onUpdateViewCursor(viewId);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to