Use map selection instead of mapObject center as OSM note position

Signed-off-by: map-per <map-per@gmx.de>
This commit is contained in:
map-per
2025-10-21 17:05:46 +02:00
committed by x7z4w
parent 08bdf41bae
commit 0d4099b555

View File

@@ -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();