From: Rob Norris Date: Sun, 31 May 2015 11:41:16 +0000 (+0100) Subject: SF Bugs#122: Fix memory cache confusion with multiple "On Disk OSM Tile Format" maps X-Git-Url: https://git.street.me.uk/andy/viking.git/commitdiff_plain/cd7c550b2f40a534fbfd50b5d8529db7c384e412 SF Bugs#122: Fix memory cache confusion with multiple "On Disk OSM Tile Format" maps Ensure use of the correct map id comparison so the string to enable differing cache lookups is set. --- diff --git a/src/vikmapslayer.c b/src/vikmapslayer.c index 9f220557..32c85ab2 100644 --- a/src/vikmapslayer.c +++ b/src/vikmapslayer.c @@ -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 )