Commit 43e68a44 authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont

Fix for Set compatibility with functions while having child Attributes

parent 5aef23f2
......@@ -88,6 +88,7 @@ XdmfSet::populateItem(const std::map<std::string, std::string> & itemProperties,
mName = name->second;
}
mType = XdmfSetType::New(itemProperties);
bool filled = false;
for(std::vector<shared_ptr<XdmfItem> >::const_iterator iter =
childItems.begin();
iter != childItems.end();
......@@ -98,7 +99,10 @@ XdmfSet::populateItem(const std::map<std::string, std::string> & itemProperties,
}
else if(shared_ptr<XdmfArray> array =
shared_dynamic_cast<XdmfArray>(*iter)) {
this->swap(array);
if (!filled) {
this->swap(array);
filled = true;
}
if (array->getReference()) {
this->setReference(array->getReference());
this->setReadMode(XdmfArray::Reference);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment