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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 10 17:46:49 UTC 2019


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

New commits:
commit 4d5a3efb8f7412c7bc5171f75cc5d1a0b0a946a5
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue Dec 10 18:26:03 2019 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Tue Dec 10 18:46:30 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