From: Pierre-Luc Beaudoin Date: Mon, 16 Mar 2009 17:41:32 +0000 (+0200) Subject: Fix Bug 575140: launcher-gtk ignores zoom-level on startup X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69a646a50f1359292961bbc6d849972def95abce;p=libchamplain Fix Bug 575140: launcher-gtk ignores zoom-level on startup --- diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c index f9125de..bdd823c 100644 --- a/champlain/champlain-view.c +++ b/champlain/champlain-view.c @@ -1050,7 +1050,12 @@ champlain_view_set_zoom_level (ChamplainView *view, gint zoom_level) ChamplainViewPrivate *priv = GET_PRIVATE (view); - if (priv->map == NULL || zoom_level == priv->zoom_level) + if (zoom_level == priv->zoom_level) + return; + + priv->zoom_level = zoom_level; + + if (priv->map == NULL) return; ClutterActor *group = champlain_zoom_level_get_actor (priv->map->current_level); @@ -1058,7 +1063,6 @@ champlain_view_set_zoom_level (ChamplainView *view, gint zoom_level) if (!map_zoom_to (priv->map, priv->map_source, zoom_level)) return; - priv->zoom_level = zoom_level; ClutterActor *new_group = champlain_zoom_level_get_actor (priv->map->current_level); resize_viewport (view); clutter_container_remove_actor (CLUTTER_CONTAINER (priv->map_layer), group);