diff options
| author | 2015-10-11 19:52:41 +0200 | |
|---|---|---|
| committer | 2015-10-11 19:52:41 +0200 | |
| commit | e582e5825c33ec5607e64bbd1605ec977f854b84 (patch) | |
| tree | 9a6e08ac0b3fc66d1ec95a9a4177b0cf12995b33 /node/dicerollernode.cpp | |
| parent | 76d6e7b0ac7ca725cab652bbafc0814fdd950fc6 (diff) | |
| download | OneRoll-e582e5825c33ec5607e64bbd1605ec977f854b84.tar.gz OneRoll-e582e5825c33ec5607e64bbd1605ec977f854b84.zip | |
-add error while no dice.
Diffstat (limited to 'node/dicerollernode.cpp')
| -rw-r--r-- | node/dicerollernode.cpp | 5 |
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(); |