diff options
author | rachytski <siarhei.rachytski@gmail.com> | 2012-10-04 00:57:27 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:44:38 +0300 |
commit | 010bfd239596295cc7aaffaa91fa1666b59c03ce (patch) | |
tree | 93bd00ac7ebe15c2a71d0eb7fa474ceceda9f97b /map/country_status_display.cpp | |
parent | b86da3ddc7a4d2ede0ffb189f0835f2594c65815 (diff) |
closes #1090
Diffstat (limited to 'map/country_status_display.cpp')
-rw-r--r-- | map/country_status_display.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/map/country_status_display.cpp b/map/country_status_display.cpp index 7b33913a50..d0c6c5365a 100644 --- a/map/country_status_display.cpp +++ b/map/country_status_display.cpp @@ -24,6 +24,7 @@ template <class T1, class T2> void CountryStatusDisplay::SetStatusMessage(string const & msgID, T1 const * t1, T2 const * t2) { m_statusMsg->setIsVisible(true); + setIsVisible(m_statusMsg->isVisible() || m_downloadButton->isVisible()); string msg = m_controller->GetStringsBundle()->GetString(msgID); if (t1) @@ -41,6 +42,8 @@ void CountryStatusDisplay::cache() { m_downloadButton->setIsVisible(false); m_statusMsg->setIsVisible(false); + setIsVisible(false); + setIsDirtyRect(true); string dn = displayName(); strings::UniString udn(strings::MakeUniString(dn)); @@ -106,6 +109,8 @@ void CountryStatusDisplay::cache() } } + setIsVisible(m_statusMsg->isVisible() || m_downloadButton->isVisible()); + // element bound rect is possibly changed setIsDirtyRect(true); } @@ -169,6 +174,8 @@ CountryStatusDisplay::CountryStatusDisplay(Params const & p) m_statusMsg->setFont(gui::Element::EActive, yg::FontDesc(18)); + setIsVisible(false); + m_countryIdx = storage::TIndex(); m_countryStatus = storage::EUnknown; m_notEnoughSpace = false; @@ -258,8 +265,12 @@ vector<m2::AnyRectD> const & CountryStatusDisplay::boundRects() const if (isDirtyRect()) { m_boundRects.clear(); - m2::RectD r = m_downloadButton->roughBoundRect(); - r.Add(m_statusMsg->roughBoundRect()); + + m2::RectD r(pivot(), pivot()); + + if (m_downloadButton->isVisible()) + r.Add(m_downloadButton->roughBoundRect()); + m_boundRects.push_back(m2::AnyRectD(r)); setIsDirtyRect(false); } |