From 0d4099b5554fe0090288e6c2ab2ceb411fd1c584 Mon Sep 17 00:00:00 2001 From: map-per Date: Tue, 21 Oct 2025 17:05:46 +0200 Subject: [PATCH] Use map selection instead of mapObject center as OSM note position Signed-off-by: map-per --- libs/map/framework.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/map/framework.cpp b/libs/map/framework.cpp index a6f6b130a..6783a5bc7 100644 --- a/libs/map/framework.cpp +++ b/libs/map/framework.cpp @@ -3114,7 +3114,16 @@ bool Framework::RollBackChanges(FeatureID const & fid) void Framework::CreateNote(osm::MapObject const & mapObject, osm::Editor::NoteProblemType const type, string const & note) { - osm::Editor::Instance().CreateNote(mapObject.GetLatLon(), mapObject.GetID(), mapObject.GetTypes(), + ms::LatLon latLon; + if (HasPlacePageInfo()) + latLon = mercator::ToLatLon(GetCurrentPlacePageInfo().GetMercator()); + else + { + LOG(LWARNING, ("Could not get selected map point, falling back to mapObject location")); + latLon = mapObject.GetLatLon(); + } + + osm::Editor::Instance().CreateNote(latLon, mapObject.GetID(), mapObject.GetTypes(), mapObject.GetDefaultName(), type, note); if (type == osm::Editor::NoteProblemType::PlaceDoesNotExist) DeactivateMapSelection();