forked from organicmaps/organicmaps-tmp
Redundant updating of visible viewport fixed.
This commit is contained in:
parent
c43b408c0e
commit
0912b4d1a7
2 changed files with 10 additions and 2 deletions
|
@ -439,9 +439,12 @@ public class BottomSheetPlacePageController implements PlacePageController, Loca
|
|||
return;
|
||||
}
|
||||
|
||||
updateViewPortRect();
|
||||
|
||||
mPlacePage.post(this::setPeekHeight);
|
||||
|
||||
if (isHiddenState(mPlacePageBehavior.getState()))
|
||||
return;
|
||||
|
||||
updateViewPortRect();
|
||||
}
|
||||
|
||||
private void updateViewPortRect()
|
||||
|
|
|
@ -1225,6 +1225,11 @@ void Framework::SetVisibleViewport(m2::RectD const & rect)
|
|||
{
|
||||
if (m_drapeEngine == nullptr)
|
||||
return;
|
||||
|
||||
double constexpr kEps = 0.5;
|
||||
if (m2::IsEqual(m_visibleViewport, rect, kEps, kEps))
|
||||
return;
|
||||
|
||||
m_visibleViewport = rect;
|
||||
m_drapeEngine->SetVisibleViewport(rect);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue