From e582e5825c33ec5607e64bbd1605ec977f854b84 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 11 Oct 2015 19:52:41 +0200 Subject: -add error while no dice. --- node/dicerollernode.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'node') diff --git a/node/dicerollernode.cpp b/node/dicerollernode.cpp index 73a7218..d8fe49c 100644 --- a/node/dicerollernode.cpp +++ b/node/dicerollernode.cpp @@ -25,6 +25,11 @@ void DiceRollerNode::run(ExecutionNode* previous) m_diceCount = result->getResult(Result::SCALAR).toReal(); m_result->setPrevious(result); + if(m_diceCount == 0) + { + m_errors.insert(NO_DICE_TO_ROLL,QObject::tr("No dice to roll")); + } + for(quint64 i=0; i < m_diceCount ; ++i) { Die* die = new Die(); -- cgit v1.2.3-70-g09d2