]> git.street.me.uk Git - andy/viking.git/commitdiff
SF Bugs#122: Fix memory cache confusion with multiple "On Disk OSM Tile Format" maps
authorRob Norris <rw_norris@hotmail.com>
Sun, 31 May 2015 11:41:16 +0000 (12:41 +0100)
committerRob Norris <rw_norris@hotmail.com>
Sun, 31 May 2015 12:57:06 +0000 (13:57 +0100)
Ensure use of the correct map id comparison so the string to enable differing cache lookups is set.

src/vikmapslayer.c

index 9f220557ccfe96cd2a88e89dcfb1e77d2aab050b..32c85ab2e161d0525eff6c3f1601c8d4ef493159 100644 (file)
@@ -847,10 +847,12 @@ static void maps_layer_post_read (VikLayer *vl, VikViewport *vp, gboolean from_f
 #endif
 
   // If the on Disk OSM Tile Layout type
-  if ( vml->maptype == 21 )
+  if ( vik_map_source_get_uniq_id(map) == MAP_ID_OSM_ON_DISK ) {
     // Copy the directory into filename
     //  thus the mapcache look up will be unique when using more than one of these map types
+    g_free ( vml->filename );
     vml->filename = g_strdup (vml->cache_dir);
+  }
 }
 
 static const gchar* maps_layer_tooltip ( VikMapsLayer *vml )