[libchamplain] Set CHAMPLAIN_STATE_DONE only if the tile has some content



commit 13b228d5577a3b63be12c273913f2c4a697e8961
Author: JiÅ?í Techet <techet gmail com>
Date:   Wed Jan 20 22:25:36 2010 +0100

    Set CHAMPLAIN_STATE_DONE only if the tile has some content
    
    Signed-off-by: JiÅ?í Techet <techet gmail com>

 champlain/champlain-file-cache.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/champlain/champlain-file-cache.c b/champlain/champlain-file-cache.c
index b18c916..e6d5cb7 100644
--- a/champlain/champlain-file-cache.c
+++ b/champlain/champlain-file-cache.c
@@ -543,10 +543,12 @@ fill_tile (ChamplainMapSource *map_source,
 
 load_next:
   if (CHAMPLAIN_IS_MAP_SOURCE(next_source))
-    {
-      champlain_map_source_fill_tile(next_source, tile);
-    }
-  champlain_tile_set_state (tile, CHAMPLAIN_STATE_DONE);
+    champlain_map_source_fill_tile(next_source, tile);
+
+  /* if we have some content, use the tile even if it wasn't validated */
+  if (champlain_tile_get_content(tile) &&
+      champlain_tile_get_state(tile) != CHAMPLAIN_STATE_DONE)
+    champlain_tile_set_state (tile, CHAMPLAIN_STATE_DONE);
 
 cleanup:
   sqlite3_reset (priv->stmt_select);



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