diff options
author | Jonas Danielsson <jonas@threetimestwo.org> | 2016-02-29 09:51:28 +0100 |
---|---|---|
committer | Jonas Danielsson <jonas@threetimestwo.org> | 2016-02-29 09:51:28 +0100 |
commit | f4cdc1848dc7e96fbd9bc0ed383e64ca8394d9f6 (patch) | |
tree | ddb6cfa93ce8c1202a51ef485c1d268b9ffa06bb /src/routeQuery.js | |
parent | eb803a1ba44b1b30e5dd695b803ae4d5d668e7eb (diff) | |
download | gnome-maps-f4cdc1848dc7e96fbd9bc0ed383e64ca8394d9f6.tar.gz |
routeQuery: Add new places to placeStore
Diffstat (limited to 'src/routeQuery.js')
-rw-r--r-- | src/routeQuery.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/routeQuery.js b/src/routeQuery.js index 21084405..4ae8264b 100644 --- a/src/routeQuery.js +++ b/src/routeQuery.js @@ -23,6 +23,9 @@ const GObject = imports.gi.GObject; const Geocode = imports.gi.GeocodeGlib; const Lang = imports.lang; +const Application = imports.application; +const PlaceStore = imports.placeStore; + const Transportation = { CAR: 0, BIKE: 1, @@ -119,6 +122,13 @@ const RouteQuery = new Lang.Class({ this._points.splice(index, 0, point); point.connect('notify::place', (function() { + let placeStore = Application.placeStore; + if (point.place) { + if (!placeStore.exists(point.place, null)) { + placeStore.addPlace(point.place, + PlaceStore.PlaceType.RECENT); + } + } this.notify('points'); }).bind(this)); this.notify('points'); |