diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-05-11 19:20:24 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-05-19 16:42:03 +0300 |
commit | 9cd7f4f8fa016367ec29aaf84fcf62cfbc9026c5 (patch) | |
tree | 03382400e89c281fa3ffdf731d1d79bc8b12998a /indexer/osm_editor.cpp | |
parent | d25221d52a9b87b83e97224f084e74fc4a6d0f6c (diff) |
[editor] notes reformatting
Diffstat (limited to 'indexer/osm_editor.cpp')
-rw-r--r-- | indexer/osm_editor.cpp | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/indexer/osm_editor.cpp b/indexer/osm_editor.cpp index db2059c20e..c38a12c5ed 100644 --- a/indexer/osm_editor.cpp +++ b/indexer/osm_editor.cpp @@ -1073,6 +1073,7 @@ bool Editor::CreatePoint(uint32_t type, m2::PointD const & mercator, MwmSet::Mwm } void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid, + feature::TypesHolder const & holder, string const & defaultName, NoteProblemType const type, string const & note) { auto const version = GetMwmCreationTimeByMwmId(fid.m_mwmId); @@ -1080,13 +1081,32 @@ 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; + switch (type) { case NoteProblemType::PlaceDoesNotExist: { - sstr << kPlaceDoesNotExistMessage; - if (!note.empty()) - sstr << " User comments: \"" << note << '\"'; + sstr << kPlaceDoesNotExistMessage << endl; auto const isCreated = GetFeatureStatus(fid) == FeatureStatus::Created; auto const createdAndUploaded = (isCreated && IsFeatureUploaded(fid.m_mwmId, fid.m_index)); CHECK(!isCreated || createdAndUploaded, ()); @@ -1098,13 +1118,8 @@ void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid, break; } - case NoteProblemType::General: - { - sstr << note; - break; - } + case NoteProblemType::General: break; } - sstr << " (OSM data version: " << stringVersion << ')'; if (canCreate) m_notes->CreateNote(latLon, sstr.str()); |