Verified Commit e6aab645 authored by James Westman's avatar James Westman
Browse files

map-layer: Fix bug in tile grid update

The function to upgrade the tile grid conflated tile coordinates with
its own internal grid coordinates. This sometimes caused tiles not to be
updated when they should, and it caused very many unnecessary tile
updates.

Fixes #14.
parent 1af3450a
......@@ -150,8 +150,8 @@ shumate_map_layer_compute_grid (ShumateMapLayer *self)
gtk_widget_measure (GTK_WIDGET (child), GTK_ORIENTATION_HORIZONTAL, 0, NULL, NULL, NULL, NULL);
gtk_widget_size_allocate (GTK_WIDGET (child), &child_allocation, -1);
if (shumate_tile_get_zoom_level (child) != zoom_level ||
shumate_tile_get_x (child) != x ||
shumate_tile_get_y (child) != y ||
shumate_tile_get_x (child) != (tile_x % source_columns) ||
shumate_tile_get_y (child) != (tile_y % source_rows) ||
shumate_tile_get_state (child) == SHUMATE_STATE_NONE)
{
GCancellable *cancellable = g_hash_table_lookup (self->tile_fill, child);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment