diff options
author | vng <viktor.govako@gmail.com> | 2012-03-03 01:46:17 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:36:14 +0300 |
commit | 23383beb8688a5332b13a5f7345251b64ccd2972 (patch) | |
tree | d54abc882b845550d9bebb4d364ba2691be264fd /indexer/feature_utils.cpp | |
parent | 6c3eed2dd74386a87fa3896c4efbc23284c2b507 (diff) |
[search] Fix bug with viewport for results without name.
Diffstat (limited to 'indexer/feature_utils.cpp')
-rw-r--r-- | indexer/feature_utils.cpp | 9 |
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 |