| 459 | } |
| 460 | |
| 461 | bool 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 | |
| 486 | void Framework::OnMapDeregistered(platform::LocalCountryFile const & localFile) |
| 487 | { |
nothing calls this directly
no test coverage detected