[libchamplain/libchamplain-0-8] Fix layers not showing properly
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain/libchamplain-0-8] Fix layers not showing properly
- Date: Wed, 30 Mar 2011 22:18:12 +0000 (UTC)
commit f217092c139af131f511f633732e23dd1228d0a8
Author: JiÅ?Ã Techet <techet gmail com>
Date: Thu Mar 31 00:01:13 2011 +0200
Fix layers not showing properly
champlain/champlain-view.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 83a4aaf..6478623 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -201,6 +201,8 @@ struct _ChamplainViewPrivate
/* Lines and shapes */
ClutterActor *polygon_layer; /* Contains the polygons */
+
+ ClutterActor *layer_group;
gint tiles_loading;
};
@@ -835,6 +837,12 @@ champlain_view_dispose (GObject *object)
priv->viewport = NULL;
}
+ if (priv->layer_group != NULL)
+ {
+ g_object_unref (priv->layer_group);
+ priv->layer_group = NULL;
+ }
+
if (priv->map_layer != NULL)
{
g_object_unref (priv->map_layer);
@@ -1572,6 +1580,8 @@ champlain_view_init (ChamplainView *view)
priv->tiles_loading = 0;
priv->update_viewport_timer = g_timer_new();
+ priv->layer_group = g_object_ref (clutter_group_new ());
+
/* Setup map layer */
priv->map_layer = g_object_ref (clutter_group_new ());
clutter_actor_show (priv->map_layer);
@@ -1593,16 +1603,19 @@ champlain_view_init (ChamplainView *view)
g_signal_connect (priv->viewport, "notify::y-origin",
G_CALLBACK (viewport_pos_changed_cb), view);
- clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport),
+ clutter_container_add_actor (CLUTTER_CONTAINER (priv->layer_group),
priv->map_layer);
- clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport),
+ clutter_container_add_actor (CLUTTER_CONTAINER (priv->layer_group),
priv->polygon_layer);
- clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport),
+ clutter_container_add_actor (CLUTTER_CONTAINER (priv->layer_group),
priv->user_layers);
+ clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport),
+ priv->layer_group);
+
clutter_actor_raise (priv->polygon_layer, priv->map_layer);
clutter_actor_raise (priv->user_layers, priv->map_layer);
-
+
/* Setup finger scroll */
priv->finger_scroll = g_object_ref (tidy_finger_scroll_new (priv->scroll_mode));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]