aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/dicerollernode.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2015-10-11 19:52:41 +0200
committerRenaud G <renaud@rolisteam.org>2015-10-11 19:52:41 +0200
commite582e5825c33ec5607e64bbd1605ec977f854b84 (patch)
tree9a6e08ac0b3fc66d1ec95a9a4177b0cf12995b33 /node/dicerollernode.cpp
parent76d6e7b0ac7ca725cab652bbafc0814fdd950fc6 (diff)
downloadOneRoll-e582e5825c33ec5607e64bbd1605ec977f854b84.tar.gz
OneRoll-e582e5825c33ec5607e64bbd1605ec977f854b84.zip
-add error while no dice.
Diffstat (limited to 'node/dicerollernode.cpp')
-rw-r--r--node/dicerollernode.cpp5
1 files changed, 5 insertions, 0 deletions
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();