From 6a91d28cf161e5a121d7bc09453e23455a109cbb Mon Sep 17 00:00:00 2001 From: Renaud Guezennec Date: Sun, 15 Mar 2026 11:42:31 +0100 Subject: [tree]: improve tree generation --- src/libparser/node/groupnode.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/libparser/node/groupnode.cpp') diff --git a/src/libparser/node/groupnode.cpp b/src/libparser/node/groupnode.cpp index e6ad550..556a432 100644 --- a/src/libparser/node/groupnode.cpp +++ b/src/libparser/node/groupnode.cpp @@ -62,7 +62,10 @@ void DieGroup::setExceptedValue(qint64 exceptedValue) //--------------------- GroupNode::GroupNode(bool complexOutput) - : m_scalarResult(new ScalarResult), m_stringResult(new StringResult), m_complexOutput(complexOutput) + : ExecutionNode("%1 [label=\"SplitNode Node\"]") + , m_scalarResult(new ScalarResult) + , m_stringResult(new StringResult) + , m_complexOutput(complexOutput) { } @@ -77,6 +80,9 @@ void GroupNode::run(ExecutionNode* previous) if(isValid(!m_previousNode, Dice::ERROR_CODE::NO_PREVIOUS_ERROR, tr("No Previous node"))) return; + if(!m_result) + return; + m_result->setPrevious(previous->getResult()); Result* tmpResult= previous->getResult(); @@ -130,17 +136,6 @@ void GroupNode::run(ExecutionNode* previous) m_stringResult->addText(QStringLiteral("%1 (%2)").arg(die.size()).arg(list.join(","))); } -QString GroupNode::toString(bool withLabel) const -{ - if(withLabel) - { - return QString("%1 [label=\"SplitNode Node\"]").arg(m_id); - } - else - { - return m_id; - } -} qint64 GroupNode::getPriority() const { qint64 priority= 0; -- cgit v1.2.3-70-g09d2