diff options
| author | 2015-04-24 21:35:17 +0200 | |
|---|---|---|
| committer | 2015-04-24 21:35:17 +0200 | |
| commit | 8beb664172cf2c15abb4e12938b8978506471c02 (patch) | |
| tree | f033c9df5436abe8848a8b4d69353229028c02bd /booleancondition.cpp | |
| parent | 67fd3b480f543f2f18bd632ea85d829ba2102a20 (diff) | |
| parent | edfcca8d1a630ca7ca79133bd0b03af14fef6363 (diff) | |
| download | OneRoll-8beb664172cf2c15abb4e12938b8978506471c02.tar.gz OneRoll-8beb664172cf2c15abb4e12938b8978506471c02.zip | |
Merge branch 'master' of github.com:obiwankennedy/DiceParser
Conflicts:
parsingtoolbox.cpp
Diffstat (limited to 'booleancondition.cpp')
| -rw-r--r-- | booleancondition.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/booleancondition.cpp b/booleancondition.cpp index 267d7e9..de619e7 100644 --- a/booleancondition.cpp +++ b/booleancondition.cpp @@ -25,7 +25,7 @@ BooleanCondition::BooleanCondition() { } -qint64 BooleanCondition::hasValid(Die* b,bool recursive) const +qint64 BooleanCondition::hasValid(Die* b,bool recursive,bool unhighlight) const { QList<qint64> listValues; if(recursive) @@ -40,7 +40,6 @@ qint64 BooleanCondition::hasValid(Die* b,bool recursive) const qint64 sum= 0; foreach(qint64 value, listValues) { - switch(m_operator) { case Equal: @@ -58,11 +57,12 @@ qint64 BooleanCondition::hasValid(Die* b,bool recursive) const case LesserOrEqual: sum+= (value<=m_value)?1:0; break; - - } } - + if((unhighlight)&&(sum==0)) + { + b->setHighlighted(false); + } return sum; } |