[gnome-maps] Do not show both route and place markers



commit 0b5e48272427de70348d266048da0b5ca6a780c2
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Sun Feb 1 10:45:59 2015 +0100

    Do not show both route and place markers

 src/mainWindow.js |    2 +-
 src/mapView.js    |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 106c17a..1ce9c8f 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -128,7 +128,7 @@ const MainWindow = new Lang.Class({
                                                this._setRevealSidebar.bind(this, true));
         sidebar.bind_property('reveal-child',
                               this.mapView, 'routeVisible',
-                              GObject.BindingFlags.DEFAULT);
+                              GObject.BindingFlags.BIDIRECTIONAL);
         this.window.application.bind_property('connected',
                                               sidebar, 'visible',
                                               GObject.BindingFlags.DEFAULT);
diff --git a/src/mapView.js b/src/mapView.js
index a6b9c86..c9586b8 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -236,6 +236,7 @@ const MapView = new Lang.Class({
 
     showSearchResult: function(place) {
         this._placeLayer.remove_all();
+        this.routeVisible = false;
         let placeMarker = new PlaceMarker.PlaceMarker({ place: place,
                                                         mapView: this });
 
@@ -247,6 +248,8 @@ const MapView = new Lang.Class({
 
     showRoute: function(route) {
         this._routeLayer.remove_all();
+        this._placeLayer.remove_all();
+
         this.routeVisible = true;
 
         route.path.forEach(this._routeLayer.add_node.bind(this._routeLayer));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]