From ae81e675a117819aa5a2eb7f9be687aff5a6bb9f Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 20 Aug 2015 11:56:10 +0200 Subject: add bool parameter to toString() function in node. --- node/keepdiceexecnode.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'node/keepdiceexecnode.cpp') diff --git a/node/keepdiceexecnode.cpp b/node/keepdiceexecnode.cpp index a225ac4..492e69c 100644 --- a/node/keepdiceexecnode.cpp +++ b/node/keepdiceexecnode.cpp @@ -62,9 +62,16 @@ void KeepDiceExecNode::setDiceKeepNumber(quint64 n) { m_numberOfDice = n; } -QString KeepDiceExecNode::toString() const +QString KeepDiceExecNode::toString(bool wl) const { - return QString("KeepDiceExecNode [label=\"KeepDiceExecNode %1\"]").arg(m_numberOfDice); + if(wl) + { + return QString("%1 [label=\"KeepDiceExecNode %1\"]").arg(m_id).arg(m_numberOfDice); + } + else + { + return m_id; + } } qint64 KeepDiceExecNode::getPriority() const { -- cgit v1.2.3-70-g09d2