mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 21:13:35 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
25
editor/editable_feature_source.cpp
Normal file
25
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);
|
||||
}
|
||||
Reference in New Issue
Block a user