[gnome-maps] mapView: Don't set new map type if same as current



commit c47d9a1a0eace35768c78b9a809dfbc7fe9ec7c8
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Tue Apr 1 22:32:17 2014 +0200

    mapView: Don't set new map type if same as current

 src/mapView.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/mapView.js b/src/mapView.js
index 0651182..32f3bfe 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -98,6 +98,9 @@ const MapView = new Lang.Class({
     },
 
     setMapType: function(mapType) {
+        if (this.view.map_source.get_id() === mapType)
+            return;
+
         let source = this._factory.create_cached_source(mapType);
         this.view.set_map_source(source);
     },


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