avoid unnessary datasource queries if style contains only empty rule(s) - closes #1670 - refs mapbox/carto#219

This commit is contained in:
Dane Springmeyer 2012-12-21 20:03:41 -08:00
parent 665d390021
commit 0d8f415070

View file

@ -233,7 +233,7 @@ bool rule::has_also_filter() const
bool rule::active(double scale) const
{
return ( scale >= min_scale_ - 1e-6 && scale < max_scale_ + 1e-6);
return ( !syms_.empty() && scale >= min_scale_ - 1e-6 && scale < max_scale_ + 1e-6);
}
}