[libchamplain] Remove the workaround related to resize_viewport()



commit 55dcf5548003debf7cfe945ddbba73c2333bd075
Author: JiÅ?í Techet <techet gmail com>
Date:   Sun Mar 14 16:15:35 2010 +0100

    Remove the workaround related to resize_viewport()
    
    I don't see anything in resize_viewport that could possibly change
    priv->latitude and priv->longitude so this workaround is not probably
    needed any more.
    
    Signed-off-by: JiÅ?í Techet <techet gmail com>

 champlain/champlain-view.c |   18 ++----------------
 1 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index ad7a48c..d03e024 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -727,17 +727,11 @@ static gboolean
 _update_idle_cb (ChamplainView *view)
 {
   ChamplainViewPrivate *priv = GET_PRIVATE (view);
-  gdouble lat, lon;
 
   clutter_actor_set_size (priv->finger_scroll,
                           priv->viewport_size.width,
                           priv->viewport_size.height);
 
-  /* Need to save latitude and longitude since they get changed by
-   * resize_viewport */
-  lat = priv->latitude;
-  lon = priv->longitude;
-
   resize_viewport (view);
 
   clutter_actor_set_position (priv->license_actor,
@@ -748,7 +742,7 @@ _update_idle_cb (ChamplainView *view)
       priv->viewport_size.height - SCALE_HEIGHT - SCALE_PADDING);
 
   if (priv->keep_center_on_resize)
-    champlain_view_center_on (view, lat, lon);
+    champlain_view_center_on (view, priv->latitude, priv->longitude);
   else
     view_load_visible_tiles (view);
 
@@ -1974,8 +1968,6 @@ champlain_view_set_zoom_level (ChamplainView *view,
   g_return_if_fail (CHAMPLAIN_IS_VIEW (view));
 
   ChamplainViewPrivate *priv = GET_PRIVATE (view);
-  gdouble longitude;
-  gdouble latitude;
 
   if (zoom_level == priv->zoom_level || ZOOM_LEVEL_OUT_OF_RANGE(priv, zoom_level))
     return;
@@ -1989,15 +1981,9 @@ champlain_view_set_zoom_level (ChamplainView *view,
 
   DEBUG ("Zooming to %d", zoom_level);
 
-  /* Fix to bug 575133: keep the lat,lon as it gets set to a wrong value
-   * when resizing the viewport, when passing from zoom_level 7 to 6
-   * (or more precisely when anchor is set to 0).
-   */
-  longitude = priv->longitude;
-  latitude = priv->latitude;
   resize_viewport (view);
 
-  champlain_view_center_on (view, latitude, longitude);
+  champlain_view_center_on (view, priv->latitude, priv->longitude);
 
   g_object_notify (G_OBJECT (view), "zoom-level");
 }



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