diff options
author | vng <viktor.govako@gmail.com> | 2011-10-12 20:19:25 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:25:55 +0300 |
commit | 60d8435e9336ae6fa0e4e4a9ea71b21cab8fe726 (patch) | |
tree | e456851a31b2f1761b2f88d0e569be23801e3a8f /indexer/feature_loader.cpp | |
parent | fafe45cbbf517d1aa576b17a01a3e0805815a8ff (diff) |
Fix scale index getting for WorldCoasts when drawing in upper scales.
Diffstat (limited to 'indexer/feature_loader.cpp')
-rw-r--r-- | indexer/feature_loader.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indexer/feature_loader.cpp b/indexer/feature_loader.cpp index d842566fdd..42d38b7308 100644 --- a/indexer/feature_loader.cpp +++ b/indexer/feature_loader.cpp @@ -285,8 +285,9 @@ int LoaderCurrent::GetScaleIndex(int scale) const int const count = m_Info.GetScalesCount(); // In case of WorldCoasts we should get correct last geometry. - if (scale > m_Info.GetLastScale()) - scale = -1; + int const lastScale = m_Info.GetLastScale(); + if (scale > lastScale) + scale = lastScale; switch (scale) { @@ -306,8 +307,9 @@ int LoaderCurrent::GetScaleIndex(int scale, offsets_t const & offsets) const int const count = static_cast<int>(offsets.size()); // In case of WorldCoasts we should get correct last geometry. - if (scale > m_Info.GetLastScale()) - scale = -1; + int const lastScale = m_Info.GetLastScale(); + if (scale > lastScale) + scale = lastScale; switch (scale) { |