mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 22:03:37 +00:00
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:
@@ -3114,7 +3114,16 @@ bool Framework::RollBackChanges(FeatureID const & fid)
|
|||||||
void Framework::CreateNote(osm::MapObject const & mapObject, osm::Editor::NoteProblemType const type,
|
void Framework::CreateNote(osm::MapObject const & mapObject, osm::Editor::NoteProblemType const type,
|
||||||
string const & note)
|
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);
|
mapObject.GetDefaultName(), type, note);
|
||||||
if (type == osm::Editor::NoteProblemType::PlaceDoesNotExist)
|
if (type == osm::Editor::NoteProblemType::PlaceDoesNotExist)
|
||||||
DeactivateMapSelection();
|
DeactivateMapSelection();
|
||||||
|
|||||||
Reference in New Issue
Block a user