gint tile_y = champlain_tile_get_y (tile);
if (tile_x < x_first || tile_x > x_count ||
tile_y < y_first || tile_y > y_count)
+ {
+ ClutterActor *group, *actor;
+ actor = champlain_tile_get_actor (tile);
+ group = champlain_zoom_level_get_actor (map->current_level);
champlain_zoom_level_remove_tile (map->current_level, tile);
+ g_object_unref (tile);
+ clutter_container_remove_actor (CLUTTER_CONTAINER (group), actor);
+ }
}
//Load new tiles if needed
actor = clutter_texture_new_from_file (filename, &error);
champlain_tile_set_actor (tile, actor);
- clutter_actor_show (actor);
champlain_tile_set_state (tile, CHAMPLAIN_STATE_DONE);
DEBUG ("Tile loaded from cache");
champlain_view_tile_ready (view, zoom_level, tile, FALSE);
+ g_object_unref (actor);
g_object_unref (tile);
g_object_unref (zoom_level);
}
ClutterEffectTemplate *etemplate;
actor = champlain_tile_get_actor (tile);
- clutter_actor_show (actor);
if (animate)
{
etemplate = clutter_effect_template_new_for_duration (750, CLUTTER_ALPHA_SINE_INC);
}
clutter_container_add (CLUTTER_CONTAINER (champlain_zoom_level_get_actor (level)), actor, NULL);
+ clutter_actor_show (actor);
+
view_position_tile (view, tile);
view_update_state (view);
}