forked from organicmaps/organicmaps
Minor fixes.
This commit is contained in:
parent
dae0ebca04
commit
3299c16306
3 changed files with 7 additions and 10 deletions
|
@ -48,6 +48,4 @@ public:
|
|||
void SetEmptyModelFn(TEmptyModelFn const & checkFn);
|
||||
|
||||
bool NeedRedraw() const;
|
||||
|
||||
m2::RectD const ScaleEtalonRect() const;
|
||||
};
|
||||
|
|
|
@ -466,24 +466,23 @@ void Framework::CheckMinGlobalRect(m2::RectD & rect)
|
|||
rect = minRect;
|
||||
}
|
||||
|
||||
void Framework::ShowRect(m2::RectD const & r)
|
||||
void Framework::ShowRect(m2::RectD rect)
|
||||
{
|
||||
m2::RectD rect(r);
|
||||
CheckMinGlobalRect(rect);
|
||||
|
||||
m_navigator.SetFromRect(m2::AnyRectD(rect));
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
void Framework::ShowRectFixed(m2::RectD const & r)
|
||||
void Framework::ShowRectFixed(m2::RectD rect)
|
||||
{
|
||||
m2::RectD rect(r);
|
||||
CheckMinGlobalRect(rect);
|
||||
|
||||
m2::RectD etalonRect(0, 0, m_renderPolicy->ScaleEtalonSize(), m_renderPolicy->ScaleEtalonSize());
|
||||
size_t const sz = m_renderPolicy->ScaleEtalonSize();
|
||||
m2::RectD etalonRect(0, 0, sz, sz);
|
||||
etalonRect.Offset(-etalonRect.SizeX() / 2, -etalonRect.SizeY());
|
||||
|
||||
m2::PointD pxCenter = m_navigator.Screen().PixelRect().Center();
|
||||
m2::PointD const pxCenter = m_navigator.Screen().PixelRect().Center();
|
||||
|
||||
etalonRect.Offset(pxCenter);
|
||||
|
||||
|
|
|
@ -204,8 +204,8 @@ public:
|
|||
|
||||
virtual void EndPaint(shared_ptr<PaintEvent> const & e);
|
||||
|
||||
void ShowRect(m2::RectD const & rect);
|
||||
void ShowRectFixed(m2::RectD const & rect);
|
||||
void ShowRect(m2::RectD rect);
|
||||
void ShowRectFixed(m2::RectD rect);
|
||||
|
||||
void DrawPlacemark(m2::PointD const & pt);
|
||||
void DisablePlacemark();
|
||||
|
|
Loading…
Add table
Reference in a new issue