[desktop] Fixed maps downloading.

This commit is contained in:
vng 2014-12-04 15:35:33 +03:00 committed by Alex Zolotarev
parent 7e39514ddd
commit a19d5e526b
2 changed files with 11 additions and 1 deletions

View file

@ -383,7 +383,7 @@ void ActiveMapsLayout::StatusChangedCallback(TIndex const & index)
TGroup group = TGroup::ENewMap;
int position = 0;
VERIFY(GetGroupAndPositionByIndex(index, group, position), ());
VERIFY(GetGroupAndPositionByIndex(index, group, position), (index));
Item & item = GetItemInGroup(group, position);
TStatus oldStatus = item.m_status;

View file

@ -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()