From 60d8435e9336ae6fa0e4e4a9ea71b21cab8fe726 Mon Sep 17 00:00:00 2001 From: vng Date: Wed, 12 Oct 2011 19:19:25 +0300 Subject: [PATCH] Fix scale index getting for WorldCoasts when drawing in upper scales. --- indexer/feature_loader.cpp | 10 ++++++---- 1 file 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(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) {