From 8b66c34eca62d90781af47a7c76b3b8b7a8a936c Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 21 Jul 2010 00:43:13 +0000 Subject: [PATCH] only using cache-first logic if caching features --- include/mapnik/feature_style_processor.hpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/include/mapnik/feature_style_processor.hpp b/include/mapnik/feature_style_processor.hpp index 3d41540d4..6fb1c1533 100644 --- a/include/mapnik/feature_style_processor.hpp +++ b/include/mapnik/feature_style_processor.hpp @@ -273,14 +273,21 @@ private: // process features featureset_ptr fs; - if (first) + if (cache_features) { - first = false; - fs = ds->features(q); + if (first) + { + first = false; + fs = ds->features(q); + } + else + { + fs = cache.features(q); + } } else { - fs = cache.features(q); + fs = ds->features(q); } if (fs)