[libshumate] vector: Fix duplicate label glitch



commit 26018cc1af6e3a4cce3fa02e09c7de83a23f303c
Author: James Westman <james jwestman net>
Date:   Sun Jan 30 14:43:13 2022 -0600

    vector: Fix duplicate label glitch

 shumate/shumate-map-layer.c       | 4 ++++
 shumate/shumate-raster-renderer.c | 2 +-
 shumate/shumate-vector-renderer.c | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/shumate/shumate-map-layer.c b/shumate/shumate-map-layer.c
index 4b581c7..05fc448 100644
--- a/shumate/shumate-map-layer.c
+++ b/shumate/shumate-map-layer.c
@@ -170,6 +170,8 @@ add_symbols (ShumateMapLayer  *self,
 #endif
 }
 
+static void recompute_grid (ShumateMapLayer *self);
+
 static void
 on_tile_filled (GObject      *source_object,
                 GAsyncResult *res,
@@ -190,6 +192,8 @@ on_tile_filled (GObject      *source_object,
   shumate_memory_cache_store_tile (data->self->memcache,
                                    data->tile,
                                    data->source_id);
+
+  recompute_grid (data->self);
 }
 
 static void
diff --git a/shumate/shumate-raster-renderer.c b/shumate/shumate-raster-renderer.c
index 9363123..838c924 100644
--- a/shumate/shumate-raster-renderer.c
+++ b/shumate/shumate-raster-renderer.c
@@ -382,7 +382,7 @@ on_data_source_done (GObject *object, GAsyncResult *res, gpointer user_data)
     g_task_return_error (task, error);
   else
     {
-      g_task_return_boolean (task, TRUE);
       shumate_tile_set_state (tile, SHUMATE_STATE_DONE);
+      g_task_return_boolean (task, TRUE);
     }
 }
diff --git a/shumate/shumate-vector-renderer.c b/shumate/shumate-vector-renderer.c
index 357ee44..68b2ba8 100644
--- a/shumate/shumate-vector-renderer.c
+++ b/shumate/shumate-vector-renderer.c
@@ -513,8 +513,8 @@ on_data_source_done (GObject *object, GAsyncResult *res, gpointer user_data)
     g_task_return_error (task, error);
   else
     {
-      g_task_return_boolean (task, TRUE);
       shumate_tile_set_state (tile, SHUMATE_STATE_DONE);
+      g_task_return_boolean (task, TRUE);
     }
 }
 


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