diff options
author | vng <viktor.govako@gmail.com> | 2014-12-04 15:35:33 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:34:23 +0300 |
commit | a19d5e526b89b8162d2f605e68321c7f654d4fe1 (patch) | |
tree | 071d0a3c2b8980c54337f4df9007257660ada699 /qt | |
parent | 7e39514ddddf987cb4d60b7ab935282eb2774887 (diff) |
[desktop] Fixed maps downloading.
Diffstat (limited to 'qt')
-rw-r--r-- | qt/draw_widget.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index 3843d46657..a8f5ea6e20 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -2,6 +2,7 @@ #include "slider_ctrl.hpp" #include "../map/render_policy.hpp" +#include "../map/country_status_display.hpp" #include "../search/result.hpp" @@ -86,6 +87,15 @@ namespace qt PinClickManager & manager = GetBalloonManager(); manager.ConnectUserMarkListener(bind(&DrawWidget::OnActivateMark, this, _1)); manager.ConnectDismissListener(&DummyDismiss); + + m_framework->GetCountryStatusDisplay()->SetDownloadCountryListener([this] (storage::TIndex const & idx, int opt) + { + storage::ActiveMapsLayout & layout = m_framework->GetCountryTree().GetActiveMapLayout(); + if (opt == -1) + layout.RetryDownloading(idx); + else + layout.DownloadMap(idx, static_cast<storage::TMapOptions>(opt)); + }); } DrawWidget::~DrawWidget() |