[libchamplain/libchamplain-0-12] When re-creating scale, remove all actors first



commit 7c0da5cbfc8b6570595ade3ef576d1ac07f7537e
Author: JiÅÃ Techet <techet gmail com>
Date:   Fri Oct 7 00:06:59 2011 +0200

    When re-creating scale, remove all actors first
    
    Otherwise the previously inserted actors are still used for redrawing.

 champlain/champlain-scale.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/champlain/champlain-scale.c b/champlain/champlain-scale.c
index 34f5f06..a4befcd 100644
--- a/champlain/champlain-scale.c
+++ b/champlain/champlain-scale.c
@@ -476,6 +476,8 @@ create_scale (ChamplainScale *scale)
   gfloat width;
   ChamplainScalePrivate *priv = scale->priv;
 
+  clutter_group_remove_all (priv->content_group);
+  
   text = clutter_text_new_with_text ("Sans 9", "X km");
   clutter_actor_set_name (text, "scale-far-label");
   clutter_container_add_actor (CLUTTER_CONTAINER (priv->content_group), text);



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