[libchamplain] Fix zoom-out at low zoom level



commit c54e4ac33ba400aa1141b869bf97e819bf31aecb
Author: JiÅ?í Techet <techet gmail com>
Date:   Tue Mar 16 01:40:40 2010 +0100

    Fix zoom-out at low zoom level
    
    When ChamplainZoomLevel was removed, removing tiles from the map layer
    was removed as well, which is a problem at low zoom levels as there
    are no tiles and the old tiles remained there.
    
    Signed-off-by: JiÅ?í Techet <techet gmail com>

 champlain/champlain-view.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index e15ea15..e50c8a7 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -1967,6 +1967,8 @@ champlain_view_set_zoom_level (ChamplainView *view,
 
   priv->zoom_level = zoom_level;
 
+  clutter_group_remove_all (CLUTTER_GROUP (priv->map_layer));
+
   DEBUG ("Zooming to %d", zoom_level);
 
   resize_viewport (view);
@@ -2412,6 +2414,8 @@ champlain_view_set_map_source (ChamplainView *view,
       g_object_notify (G_OBJECT (view), "zoom-level");
     }
 
+  clutter_group_remove_all (CLUTTER_GROUP (priv->map_layer));
+
   update_license (view);
   champlain_view_center_on (view, priv->latitude, priv->longitude);
 
@@ -2793,6 +2797,8 @@ view_set_zoom_level_at (ChamplainView *view,
 
   priv->zoom_level = zoom_level;
 
+  clutter_group_remove_all (CLUTTER_GROUP (priv->map_layer));
+
   /* Get the new x,y in the new zoom level */
   x2 = champlain_map_source_get_x (priv->map_source, priv->zoom_level, lon);
   y2 = champlain_map_source_get_y (priv->map_source, priv->zoom_level, lat);



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