Skip to content
Snippets Groups Projects
Commit 851a39d1 authored by Karsten Rink's avatar Karsten Rink
Browse files

fixed issue for point names got lost when merging or saving geometries

parent 39f8273a
No related branches found
No related tags found
No related merge requests found
...@@ -243,4 +243,10 @@ std::string const& PointVec::getItemNameByID(std::size_t id) const ...@@ -243,4 +243,10 @@ std::string const& PointVec::getItemNameByID(std::size_t id) const
return _id_to_name_map[id]; return _id_to_name_map[id];
} }
void PointVec::setNameForElement(std::size_t id, std::string const& name)
{
TemplateVec::setNameForElement(id, name);
_id_to_name_map[id] = name;
}
} // end namespace } // end namespace
...@@ -101,6 +101,8 @@ public: ...@@ -101,6 +101,8 @@ public:
std::string const& getItemNameByID(std::size_t id) const; std::string const& getItemNameByID(std::size_t id) const;
void setNameForElement(std::size_t id, std::string const& name) override;
private: private:
/** /**
* After the point set is modified (for example by makePntsUnique()) the mapping has to be corrected. * After the point set is modified (for example by makePntsUnique()) the mapping has to be corrected.
......
...@@ -195,7 +195,7 @@ public: ...@@ -195,7 +195,7 @@ public:
} }
/// Sets the given name for the element of the given ID. /// Sets the given name for the element of the given ID.
void setNameForElement(std::size_t id, std::string const& name) virtual void setNameForElement(std::size_t id, std::string const& name)
{ {
// Erase id if found in map. // Erase id if found in map.
auto it = findFirstElementByID(id); auto it = findFirstElementByID(id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment