[gnome-maps] mapLocation: make sure bbox is valid
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] mapLocation: make sure bbox is valid
- Date: Tue, 4 Feb 2014 18:40:48 +0000 (UTC)
commit cb07bae3d96da61d28cae8bb4dafe67ce1c05c98
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Tue Feb 4 19:39:28 2014 +0100
mapLocation: make sure bbox is valid
If the bounding box from Nominatim is not a valid Champlain
bounding box the ensure_visible call will fail. Then we will never
get the animation-completed signal.
src/mapLocation.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/mapLocation.js b/src/mapLocation.js
index c01029c..b6ec9c1 100644
--- a/src/mapLocation.js
+++ b/src/mapLocation.js
@@ -178,7 +178,7 @@ const MapLocation = new Lang.Class({
},
_ensureVisible: function(fromLocation) {
- if (this.bbox !== null) {
+ if (this.bbox !== null && this.bbox.is_valid()) {
let visibleBox = this.bbox.copy();
visibleBox.extend(fromLocation.latitude, fromLocation.longitude);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]