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/dicerollernode.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/libparser/node/dicerollernode.cpp') diff --git a/src/libparser/node/dicerollernode.cpp b/src/libparser/node/dicerollernode.cpp index 8ef0164..f3e0887 100644 --- a/src/libparser/node/dicerollernode.cpp +++ b/src/libparser/node/dicerollernode.cpp @@ -66,16 +66,10 @@ std::pair DiceRollerNode::getRange() const { return std::make_pair(m_min, m_max); } -QString DiceRollerNode::toString(bool wl) const +QString DiceRollerNode::toString(bool withlabel) const { - if(wl) - { - return QString("%1 [label=\"DiceRollerNode faces: %2\"]").arg(m_id).arg(getFaces()); - } - else - { - return m_id; - } + return withlabel ? QString("%1 [label=\"DiceRollerNode faces: %2\"]").arg(m_id).arg(getFaces()) : + ExecutionNode::toString(withlabel); } qint64 DiceRollerNode::getPriority() const { -- cgit v1.2.3-70-g09d2