Fixed showing a bookmark with invalid scale.

This commit is contained in:
Daria Volvenkova 2018-04-10 18:42:47 +03:00 committed by Roman Kuznetsov
parent d13da3aee6
commit ab3ce40f29
2 changed files with 3 additions and 4 deletions

View file

@ -444,7 +444,6 @@ private:
df::DrapeEngineSafePtr m_drapeEngine;
AsyncLoadingCallbacks m_asyncLoadingCallbacks;
std::atomic<bool> m_needTeardown;
kml::MarkGroupId m_lastGroupID;
size_t m_openedEditSessionsCount = 0;
bool m_loadBookmarksFinished = false;
bool m_firstDrapeNotification = false;

View file

@ -955,12 +955,12 @@ void Framework::ShowBookmark(Bookmark const * mark)
StopLocationFollow();
double scale = mark->GetScale();
if (scale == -1.0)
auto scale = static_cast<int>(mark->GetScale());
if (scale == 0)
scale = scales::GetUpperComfortScale();
if (m_drapeEngine != nullptr)
m_drapeEngine->SetModelViewCenter(mark->GetPivot(), static_cast<int>(scale), true /* isAnim */,
m_drapeEngine->SetModelViewCenter(mark->GetPivot(), scale, true /* isAnim */,
true /* trackVisibleViewport */);
place_page::Info info;