From: Pierre-Luc Beaudoin Date: Fri, 5 Sep 2008 02:04:02 +0000 (-0400) Subject: Code simplification X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c377b1f1db68262a5598ca12d1ef6292356a63b;p=libchamplain Code simplification --- diff --git a/champlain/champlainview.c b/champlain/champlainview.c index 785aae6..27712dd 100644 --- a/champlain/champlainview.c +++ b/champlain/champlainview.c @@ -529,8 +529,7 @@ champlain_view_center_on (ChamplainView *champlainView, gdouble longitude, gdoub if ( anchor->y < 0 ) anchor->y = 0; - gdouble max = priv->map->longitude_to_x(priv->map, 180, priv->map->current_level->level) - - (G_MAXINT16 / 2); + gdouble max = zoom_level_get_width(priv->map->current_level) - (G_MAXINT16 / 2); if (anchor->x > max) anchor->x = max; if (anchor->y > max)