diff options
| author | 2015-10-11 22:04:18 +0200 | |
|---|---|---|
| committer | 2015-10-11 22:04:18 +0200 | |
| commit | df5d5704a58bb00be445c8ae0a06cf026b2e826b (patch) | |
| tree | 987d1c80a01b25440f121de7cf24ff989a5a9fa4 /node/keepdiceexecnode.cpp | |
| parent | 60d0887547ad9a1b05cba265bbaa7c43e0e545ee (diff) | |
| download | OneRoll-df5d5704a58bb00be445c8ae0a06cf026b2e826b.tar.gz OneRoll-df5d5704a58bb00be445c8ae0a06cf026b2e826b.zip | |
-set message if Too many dice error is trigged.
Diffstat (limited to 'node/keepdiceexecnode.cpp')
| -rw-r--r-- | node/keepdiceexecnode.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/node/keepdiceexecnode.cpp b/node/keepdiceexecnode.cpp index 2ca54f4..64d53f0 100644 --- a/node/keepdiceexecnode.cpp +++ b/node/keepdiceexecnode.cpp @@ -43,6 +43,10 @@ m_previousNode = previous; { QList<Die*> diceList=previousDiceResult->getResultList(); QList<Die*> diceList2 = diceList.mid(0,m_numberOfDice); + if(m_numberOfDice > diceList.size()) + { + m_errors.insert(TOO_MANY_DICE,QObject::tr(" You ask to keep %1 dice but the result only has %2").arg(m_numberOfDice).arg(diceList.size())); + } foreach(Die* tmp,diceList.mid(m_numberOfDice,-1)) { |