MCPcopy Create free account
hub / github.com/comaps/comaps / OnCountryFileDelete

Method OnCountryFileDelete

libs/map/framework.cpp:461–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461bool Framework::OnCountryFileDelete(storage::CountryId const & countryId, storage::LocalFilePtr const localFile)
462{
463 // Soft reset to signal that mwm file may be out of date in routing caches.
464 m_routingManager.ResetRoutingSession();
465
466 if (countryId == m_lastReportedCountry)
467 m_lastReportedCountry = kInvalidCountryId;
468
469 GetSearchAPI().CancelAllSearches();
470
471 m2::RectD rect = mercator::Bounds::FullRect();
472
473 bool deferredDelete = false;
474 if (localFile)
475 {
476 rect = m_infoGetter->GetLimitRectForLeaf(countryId);
477 m_featuresFetcher.DeregisterMap(platform::CountryFile(countryId));
478 deferredDelete = true;
479 }
480 InvalidateRect(rect);
481
482 GetSearchAPI().ClearCaches();
483 return deferredDelete;
484}
485
486void Framework::OnMapDeregistered(platform::LocalCountryFile const & localFile)
487{

Callers

nothing calls this directly

Calls 6

ResetRoutingSessionMethod · 0.80
CancelAllSearchesMethod · 0.80
GetLimitRectForLeafMethod · 0.80
CountryFileClass · 0.50
DeregisterMapMethod · 0.45
ClearCachesMethod · 0.45

Tested by

no test coverage detected