summaryrefslogtreecommitdiff
path: root/src/core/model/Node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/model/Node.cpp')
-rw-r--r--src/core/model/Node.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/model/Node.cpp b/src/core/model/Node.cpp
index 5867fa3..71d59ce 100644
--- a/src/core/model/Node.cpp
+++ b/src/core/model/Node.cpp
@@ -430,12 +430,20 @@ bool Node::validate(Logger &logger) const
case ValidationState::VALIDATING:
// We've run into recursion -- a circular structure cannot be
// properly validated, so return false
- logger.error("This validation run lead to a cycle. As a fallback it is set to invalid!");
+ logger.error(
+ "This validation run lead to a cycle. As a fallback it is set "
+ "to invalid!");
return false;
}
return false;
}
+void Node::setParent(Handle<Node> p)
+{
+ invalidate();
+ parent = acquire(p);
+}
+
/* RTTI type registrations */
namespace RttiTypes {
const Rtti Node =