review fixes

This commit is contained in:
Arsentiy Milchakov 2017-05-12 14:44:59 +03:00 committed by r.kuznetsov
parent 9cd7f4f8fa
commit ab8ffff250

View file

@ -1081,26 +1081,8 @@ void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid,
ostringstream sstr;
auto canCreate = true;
sstr << "User\'s comment: ";
if (note.empty())
sstr << "- ;" << endl;
else
sstr << note << ';' << endl;
sstr << "Poi name: ";
if (defaultName.empty())
sstr << "- ;" << endl;
else
sstr << defaultName << ';' << endl;
sstr << "Poi types: ";
for (auto const & type : holder.ToObjectNames())
{
sstr << type << ' ';
}
sstr << ';' << endl;
sstr << "OSM data version: " << stringVersion << ';' << endl;
if (!note.empty())
sstr << "\"" << note << "\"" << endl;
switch (type)
{
@ -1121,6 +1103,20 @@ void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid,
case NoteProblemType::General: break;
}
if (defaultName.empty())
sstr << "POI has no name" << endl;
else
sstr << "POI name: " << defaultName << endl;
sstr << "POI types:";
for (auto const & type : holder.ToObjectNames())
{
sstr << ' ' << type;
}
sstr << endl;
sstr << "OSM data version: " << stringVersion << endl;
if (canCreate)
m_notes->CreateNote(latLon, sstr.str());
}