From 20d3e71f26ca884271ed5d372a8459394554c147 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Tue, 20 Jan 2015 01:24:11 +0100 Subject: finished setter revival in Document classes, hopefully. --- src/core/model/Node.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core/model/Node.cpp') 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 p) +{ + invalidate(); + parent = acquire(p); +} + /* RTTI type registrations */ namespace RttiTypes { const Rtti Node = -- cgit v1.2.3