forked from organicmaps/organicmaps
[guides on map] incorrect zoom level
This commit is contained in:
parent
a635e75521
commit
2a9aff2e9b
2 changed files with 6 additions and 2 deletions
|
@ -227,7 +227,9 @@ void GuidesManager::OnRequestSucceed(guides_on_map::GuidesOnMap const & guides,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (suggestZoom && m_zoom > m_guides.m_suggestedZoom)
|
||||
if (suggestZoom &&
|
||||
m_guides.m_suggestedZoom != guides_on_map::GuidesOnMap::kIncorrectZoom &&
|
||||
m_zoom > m_guides.m_suggestedZoom)
|
||||
{
|
||||
m_drapeEngine.SafeCall(&df::DrapeEngine::SetModelViewCenter,
|
||||
m_lastShownViewport.GetGlobalRect().Center(), m_guides.m_suggestedZoom,
|
||||
|
|
|
@ -43,8 +43,10 @@ struct GuidesNode
|
|||
|
||||
struct GuidesOnMap
|
||||
{
|
||||
static uint8_t constexpr kIncorrectZoom = 0;
|
||||
|
||||
std::vector<GuidesNode> m_nodes;
|
||||
uint8_t m_suggestedZoom = 0;
|
||||
uint8_t m_suggestedZoom = kIncorrectZoom;
|
||||
};
|
||||
|
||||
using GuidesOnMapCallback = platform::SafeCallback<void(GuidesOnMap const & gallery)>;
|
||||
|
|
Loading…
Add table
Reference in a new issue