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:
authorvng <viktor.govako@gmail.com>2011-10-12 20:19:25 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:25:55 +0300
commit60d8435e9336ae6fa0e4e4a9ea71b21cab8fe726 (patch)
treee456851a31b2f1761b2f88d0e569be23801e3a8f /indexer/feature_loader.cpp
parentfafe45cbbf517d1aa576b17a01a3e0805815a8ff (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.cpp10
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)
{