[gnome-maps/gnome-3-18] mapWalker: Make sure bounding box is valid



commit 46395e83d1b6584a7ae869632e8a03c7532706ba
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Fri Nov 6 00:17:48 2015 +0800

    mapWalker: Make sure bounding box is valid

 src/mapWalker.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/mapWalker.js b/src/mapWalker.js
index b8365e3..f36f174 100644
--- a/src/mapWalker.js
+++ b/src/mapWalker.js
@@ -56,7 +56,7 @@ const MapWalker = new Lang.Class({
     // Zoom to the maximal zoom-level that fits the place type
     zoomToFit: function() {
         let zoom;
-        if (this._boundingBox !== null) {
+        if (this._boundingBox !== null && this._boundingBox.is_valid()) {
             this._view.zoom_level = this._view.max_zoom_level - 1;
             this._view.ensure_visible(this._boundingBox, false);
         } else {


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