forked from organicmaps/organicmaps
Fixed showing a bookmark with invalid scale.
This commit is contained in:
parent
d13da3aee6
commit
ab3ce40f29
2 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue