forked from organicmaps/organicmaps
[desktop] Fixed maps downloading.
This commit is contained in:
parent
7e39514ddd
commit
a19d5e526b
2 changed files with 11 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue