[editor] Correctly process created features in the Index.

This commit is contained in:
Alex Zolotarev 2016-03-05 22:14:50 +03:00 committed by Sergey Yershov
parent 36b83eb5c9
commit 7847d189c7
2 changed files with 3 additions and 3 deletions

View file

@ -109,7 +109,7 @@ void Index::FeaturesLoaderGuard::GetFeatureByIndex(uint32_t index, FeatureType &
{
MwmId const & id = m_handle.GetId();
ASSERT_NOT_EQUAL(osm::Editor::FeatureStatus::Deleted, m_editor.GetFeatureStatus(id, index),
("Deleted feature was cached. Please review your code."));
("Deleted feature was cached. It should not be here. Please review your code."));
if (!m_editor.Instance().GetEditedFeature(id, index, ft))
GetOriginalFeatureByIndex(index, ft);
}

View file

@ -229,9 +229,9 @@ public:
{
osm::Editor::FeatureStatus const fts = editor.GetFeatureStatus(id, fidIter->m_index);
ASSERT_NOT_EQUAL(osm::Editor::FeatureStatus::Deleted, fts,
("Deleted feature was cached. Please review your code."));
("Deleted feature was cached. It should not be here. Please review your code."));
FeatureType featureType;
if (fts == osm::Editor::FeatureStatus::Modified)
if (fts == osm::Editor::FeatureStatus::Modified || fts == osm::Editor::FeatureStatus::Created)
{
VERIFY(editor.GetEditedFeature(id, fidIter->m_index, featureType), ());
}