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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 11 08:44:46 UTC 2019


 loleaflet/src/layer/tile/TileLayer.js |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 970f8cb75a0472aef61ec256f05b20b922faf4ae
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue Dec 10 18:26:03 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Dec 11 09:44:04 2019 +0100

    Mobile: long-press on a selection, should not kill the selection
    
    Don't clear selection unconditionally. _clearSearchResults() method
    is called by mouse click and we don't want to clear selection
    during opening a context menu.
    If there is any search term then we can clear the selection,
    otherwise don't change it.
    
    Change-Id: I8f672e4d6d30e9bb3828a39e591a64598a7a8722
    Reviewed-on: https://gerrit.libreoffice.org/84885
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 0120036ea..e51b2f755 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1423,11 +1423,13 @@ L.TileLayer = L.GridLayer.extend({
 	},
 
 	_clearSearchResults: function() {
+		if (this._searchTerm) {
+			this._selections.clearLayers();
+		}
 		this._lastSearchResult = null;
 		this._searchResults = null;
 		this._searchTerm = null;
 		this._searchResultsLayer.clearLayers();
-		this._selections.clearLayers();
 	},
 
 	_drawSearchResults: function() {


More information about the Libreoffice-commits mailing list