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 Nov 4, 2024
1 parent ea7f52a commit 2421208
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 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,13 @@ bool BaseData::setParent(BaseData* parent, const std::string& path)
addInput(parent);
BaseData::setDirtyValue();
m_counter++;
m_isSet = true;
}else if (!path.empty())
}
else if (!path.empty()) // the referenced data has been created yet
{
parentData.setPath(path);
}

m_isSet = true;

return true;
}
Expand Down

0 comments on commit 2421208

Please sign in to comment.