[editor] Improve place does not exist note text

Signed-off-by: map-per <map-per@gmx.de>
This commit is contained in:
map-per
2025-11-08 18:01:38 +01:00
committed by map-per
parent 31dcb954b1
commit 91ba38df56

View File

@@ -1107,16 +1107,17 @@ void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid, featur
std::ostringstream sstr; std::ostringstream sstr;
auto canCreate = true; auto canCreate = true;
if (!note.empty())
sstr << '"' << note << "\"\n";
switch (type) switch (type)
{ {
case NoteProblemType::PlaceDoesNotExist: case NoteProblemType::PlaceDoesNotExist:
{ {
sstr << "The place has gone or never existed. A CoMaps user reported " sstr << "This place does not exist:\n";
"that the POI was visible on the map (see snapshot date below), but was not found "
"on the ground.\n"; if (!note.empty())
sstr << '"' << note << "\"\n";
sstr << "A CoMaps user reported that the POI was visible on the map (see snapshot date below), "
"but was not found on the ground.\n";
auto const features = m_features.Get(); auto const features = m_features.Get();
auto const isCreated = GetFeatureStatusImpl(*features, fid.m_mwmId, fid.m_index) == FeatureStatus::Created; auto const isCreated = GetFeatureStatusImpl(*features, fid.m_mwmId, fid.m_index) == FeatureStatus::Created;
auto const createdAndUploaded = (isCreated && IsFeatureUploadedImpl(*features, fid.m_mwmId, fid.m_index)); auto const createdAndUploaded = (isCreated && IsFeatureUploadedImpl(*features, fid.m_mwmId, fid.m_index));
@@ -1129,7 +1130,12 @@ void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid, featur
break; break;
} }
case NoteProblemType::General: break; case NoteProblemType::General:
{
if (!note.empty())
sstr << '"' << note << "\"\n";
break;
}
} }
if (!canCreate) if (!canCreate)