| 484 | } |
| 485 | |
| 486 | void Framework::OnMapDeregistered(platform::LocalCountryFile const & localFile) |
| 487 | { |
| 488 | auto action = [this, localFile] |
| 489 | { |
| 490 | m_transitManager.OnMwmDeregistered(localFile); |
| 491 | m_isolinesManager.OnMwmDeregistered(localFile); |
| 492 | m_trafficManager.OnMwmDeregistered(localFile); |
| 493 | m_popularityLoader.OnMwmDeregistered(localFile); |
| 494 | |
| 495 | m_storage.DeleteCustomCountryVersion(localFile); |
| 496 | }; |
| 497 | |
| 498 | // Call action on thread in which the framework was created |
| 499 | // For more information look at comment for Observer class in mwm_set.hpp |
| 500 | if (m_storage.GetThreadChecker().CalledOnOriginalThread()) |
| 501 | action(); |
| 502 | else |
| 503 | GetPlatform().RunTask(Platform::Thread::Gui, action); |
| 504 | } |
| 505 | |
| 506 | bool Framework::HasUnsavedEdits(storage::CountryId const & countryId) |
| 507 | { |