[libchamplain] Put the tiles immediately to the right position
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Put the tiles immediately to the right position
- Date: Tue, 23 Mar 2010 14:40:25 +0000 (UTC)
commit 50d5f986f8052f15375f7882222c2fe88677c6fc
Author: JiÅ?Ã Techet <techet gmail com>
Date: Fri Mar 12 00:53:29 2010 +0100
Put the tiles immediately to the right position
Position the tile already when loading so that it doesn't have to be
repositioned after state is set to DONE (in which case there could be
a short period of time in which the tile is displayed at incorrect
position)
Signed-off-by: JiÅ?Ã Techet <techet gmail com>
champlain/champlain-view.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 0d684d0..db0c536 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -2318,6 +2318,7 @@ view_load_visible_tiles (ChamplainView *view)
"size", tile_size, NULL);
g_signal_connect (tile, "notify::state", G_CALLBACK (tile_state_notify), view);
clutter_container_add_actor (CLUTTER_CONTAINER (level), CLUTTER_ACTOR (tile));
+ view_position_tile (view, tile);
champlain_tile_set_state (tile, CHAMPLAIN_STATE_LOADING);
champlain_map_source_fill_tile (priv->map_source, tile);
@@ -2365,8 +2366,7 @@ view_tiles_reposition (ChamplainView* view)
{
ChamplainTile *tile = CHAMPLAIN_TILE (clutter_group_get_nth_child (CLUTTER_GROUP (priv->map_zoom_level), i));
- if (champlain_tile_get_state (tile) == CHAMPLAIN_STATE_DONE)
- view_position_tile (view, tile);
+ view_position_tile (view, tile);
}
}
@@ -2403,7 +2403,6 @@ tile_state_notify (GObject *gobject,
GParamSpec *pspec,
gpointer data)
{
- view_position_tile (CHAMPLAIN_VIEW (data), CHAMPLAIN_TILE (gobject));
view_update_state (CHAMPLAIN_VIEW (data));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]