Skip to content

Commit

Permalink
set isset flag even if the parent is null
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy committed Oct 23, 2024
1 parent 0c87f19 commit 732d8a5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Sofa/framework/Core/src/sofa/core/objectmodel/BaseData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,14 @@ bool BaseData::setParent(BaseData* parent, const std::string& path)
addInput(parent);
BaseData::setDirtyValue();
m_counter++;
m_isSet = true;
}else if (!path.empty())
}
// the referenced parent data has not been created yet but a path has been given
else if (!path.empty())
{
parentData.setPath(path);
}

m_isSet = true;

return true;
}
Expand Down

0 comments on commit 732d8a5

Please sign in to comment.