| 3175 | } |
| 3176 | |
| 3177 | void Framework::CreateNote(osm::MapObject const & mapObject, osm::Editor::NoteProblemType const type, |
| 3178 | string const & note) |
| 3179 | { |
| 3180 | ms::LatLon latLon; |
| 3181 | if (HasPlacePageInfo()) |
| 3182 | latLon = mercator::ToLatLon(GetCurrentPlacePageInfo().GetMercator()); |
| 3183 | else |
| 3184 | { |
| 3185 | LOG(LWARNING, ("Could not get selected map point, falling back to mapObject location")); |
| 3186 | latLon = mapObject.GetLatLon(); |
| 3187 | } |
| 3188 | |
| 3189 | osm::Editor::Instance().CreateNote(latLon, mapObject.GetID(), mapObject.GetTypes(), mapObject.GetDefaultName(), type, |
| 3190 | note); |
| 3191 | if (type == osm::Editor::NoteProblemType::PlaceDoesNotExist) |
| 3192 | DeactivateMapSelection(); |
| 3193 | } |
| 3194 | |
| 3195 | void Framework::RunUITask(function<void()> fn) |
| 3196 | { |
no test coverage detected