Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
25
libs/editor/editable_feature_source.cpp
Normal file
25
libs/editor/editable_feature_source.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include "editor/editable_feature_source.hpp"
|
||||
|
||||
#include "editor/osm_editor.hpp"
|
||||
|
||||
FeatureStatus EditableFeatureSource::GetFeatureStatus(uint32_t index) const
|
||||
{
|
||||
osm::Editor & editor = osm::Editor::Instance();
|
||||
return editor.GetFeatureStatus(m_handle.GetId(), index);
|
||||
}
|
||||
|
||||
std::unique_ptr<FeatureType> EditableFeatureSource::GetModifiedFeature(uint32_t index) const
|
||||
{
|
||||
osm::Editor & editor = osm::Editor::Instance();
|
||||
auto const emo = editor.GetEditedFeature(FeatureID(m_handle.GetId(), index));
|
||||
if (emo)
|
||||
return FeatureType::CreateFromMapObject(*emo);
|
||||
return {};
|
||||
}
|
||||
|
||||
void EditableFeatureSource::ForEachAdditionalFeature(m2::RectD const & rect, int scale,
|
||||
std::function<void(uint32_t)> const & fn) const
|
||||
{
|
||||
osm::Editor & editor = osm::Editor::Instance();
|
||||
editor.ForEachCreatedFeature(m_handle.GetId(), fn, rect, scale);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue