Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'indexer/feature_utils.cpp')
-rw-r--r--indexer/feature_utils.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indexer/feature_utils.cpp b/indexer/feature_utils.cpp
index baf2f58531..31840b4625 100644
--- a/indexer/feature_utils.cpp
+++ b/indexer/feature_utils.cpp
@@ -54,8 +54,13 @@ public:
void CorrectScaleForVisibility(TypesHolder const & types, int & scale) const
{
pair<int, int> const scaleR = feature::DrawableScaleRangeForText(types);
- if (scale < scaleR.first || scale > scaleR.second)
- scale = scaleR.first;
+
+ // Result types can be without visible texts (matched by category).
+ if (scaleR.first != -1)
+ {
+ if (scale < scaleR.first || scale > scaleR.second)
+ scale = scaleR.first;
+ }
}
m2::RectD CorrectRectForScales(TypesHolder const & types, m2::RectD const & rect) const