From 5c36f34d6be47ce1747eeb7dd5059b905e42b914 Mon Sep 17 00:00:00 2001 From: obiwankennedy Date: Tue, 7 Jan 2014 19:00:40 +0100 Subject: Update diceresult.cpp better management of scalar mode --- diceresult.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'diceresult.cpp') diff --git a/diceresult.cpp b/diceresult.cpp index 8fcc5b3..c000623 100644 --- a/diceresult.cpp +++ b/diceresult.cpp @@ -19,9 +19,18 @@ void DiceResult::setResultList(QList list) } bool DiceResult::isScalar() const { + if(m_diceValues.size()==1) + { + return true; + } return false; } qint64 DiceResult::getScalar() { + + if(m_diceValues.size()==1) + { + return m_diceValues[0].getValue(); + } return 0; } -- cgit v1.2.3-70-g09d2