summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Danielsson <jonas@threetimestwo.org>2013-12-04 13:51:28 +0100
committerJiří Techet <techet@gmail.com>2013-12-06 01:01:32 +0100
commit6c26dc2a7f07550c5dc960c32b31de398975c01e (patch)
tree7ad8f47c24c6bf95c11ced019574014e3567fb62
parent9033f82ff09a426ec393a33b7befff3c7f22130c (diff)
downloadlibchamplain-6c26dc2a7f07550c5dc960c32b31de398975c01e.tar.gz
view: notify max/min-zoom-level on set_map_source
When setting a new map_source we change the vie max/min-zoom-level but we do not make sure they get notified. This patchs sets them using champlain_view_set_[max|min]_zoom_level to ensure this. https://bugzilla.gnome.org/show_bug.cgi?id=719840
-rw-r--r--champlain/champlain-view.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 0033af3..4f132d8 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -2185,6 +2185,8 @@ champlain_view_set_map_source (ChamplainView *view,
CHAMPLAIN_IS_MAP_SOURCE (source));
ChamplainViewPrivate *priv = view->priv;
+ guint source_min_zoom;
+ guint source_max_zoom;
if (priv->map_source == source)
return;
@@ -2195,8 +2197,10 @@ champlain_view_set_map_source (ChamplainView *view,
g_list_free_full (priv->overlay_sources, g_object_unref);
priv->overlay_sources = NULL;
- priv->min_zoom_level = champlain_map_source_get_min_zoom_level (priv->map_source);
- priv->max_zoom_level = champlain_map_source_get_max_zoom_level (priv->map_source);
+ source_min_zoom = champlain_map_source_get_min_zoom_level (priv->map_source);
+ champlain_view_set_min_zoom_level (view, source_min_zoom);
+ source_max_zoom = champlain_map_source_get_max_zoom_level (priv->map_source);
+ champlain_view_set_max_zoom_level (view, source_max_zoom);
/* Keep same zoom level if the new map supports it */
if (priv->zoom_level > priv->max_zoom_level)