loleaflet/src/control/Control.Search.js |    8 ++++----
 loleaflet/src/layer/tile/TileLayer.js   |    1 -
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit def78817b07f808578df43b84e5425ed82508513
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Sun May 31 21:47:15 2015 +0200

    TiledLayer should not clear the search bar's not found indication.

diff --git a/loleaflet/src/control/Control.Search.js 
b/loleaflet/src/control/Control.Search.js
index 336b022..5f7c678 100644
--- a/loleaflet/src/control/Control.Search.js
+++ b/loleaflet/src/control/Control.Search.js
@@ -40,13 +40,13 @@ L.Control.Search = L.Control.extend({
 
                this._disabled = true;
                this._updateDisabled();
-               map.on('searchfound searchnotfound', this._searchResultFound, 
this);
+               map.on('clearnotfound searchnotfound', this._searchResultFound, 
this);
 
                return container;
        },
 
        onRemove: function (map) {
-               map.on('searchfound searchnotfound', this._searchResultFound, 
this);
+               map.on('clearnotfound searchnotfound', this._searchResultFound, 
this);
        },
 
        _searchStart: function (e) {
@@ -76,12 +76,12 @@ L.Control.Search = L.Control.extend({
        },
 
        _searchResultFound: function (e) {
-               if (e.type === 'searchfound') {
+               if (e.type === 'clearnotfound') {
                        L.DomUtil.removeClass(this._searchBar, 
'search-not-found');
                }
                else if (e.type == 'searchnotfound') {
                        L.DomUtil.addClass(this._searchBar, 'search-not-found');
-                       setTimeout(L.bind(this._map.fire, this._map, 
'searchfound'), 500);
+                       setTimeout(L.bind(this._map.fire, this._map, 
'clearnotfound'), 500);
                }
        },
 
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 2c7e447..23a36bd 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -225,7 +225,6 @@ L.TileLayer = L.GridLayer.extend({
                        strTwips = textMsg.match(/\d+/g);
                        this._clearSelections();
                        if (strTwips != null) {
-                               this._map.fire('searchfound');
                                var rectangles = [];
                                var selectionCenter = new L.Point(0,0);
                                for (var i = 0; i < strTwips.length; i += 4) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to