diff options
| author | 2020-03-25 23:44:20 +0100 | |
|---|---|---|
| committer | 2020-03-28 02:05:05 +0100 | |
| commit | 2c5809b9f4c23fea2b863c214483a0435a0c3658 (patch) | |
| tree | eb71ce617b1b289f22ce818f8fe8381644a6be24 /diceparser.cpp | |
| parent | a50fb80de0c1890fe03bccd239a827a8ccb67f68 (diff) | |
| download | OneRoll-2c5809b9f4c23fea2b863c214483a0435a0c3658.tar.gz OneRoll-2c5809b9f4c23fea2b863c214483a0435a0c3658.zip | |
@ placeholder does not display final scalar when y operator is set.
Diffstat (limited to 'diceparser.cpp')
| -rw-r--r-- | diceparser.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/diceparser.cpp b/diceparser.cpp index aeb367e..efc4439 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -213,6 +213,7 @@ void DiceParser::getDiceResultFromAllInstruction(QList<ExportedDiceResult>& resu Result* result= next->getResult(); ExportedDiceResult nodeResult; QSet<QString> alreadyAdded; + // qDebug() << "start"; while(nullptr != result) { if(result->hasResultOfType(Dice::RESULT_TYPE::DICE_LIST)) @@ -220,7 +221,7 @@ void DiceParser::getDiceResultFromAllInstruction(QList<ExportedDiceResult>& resu DiceResult* diceResult= dynamic_cast<DiceResult*>(result); QList<HighLightDice> list; quint64 faces= 0; - + // qDebug() << "Begin of loop"; for(auto& die : diceResult->getResultList()) { faces= die->getFaces(); @@ -229,17 +230,23 @@ void DiceParser::getDiceResultFromAllInstruction(QList<ExportedDiceResult>& resu // << next->toString(true); HighLightDice hlDice(die->getListValue(), die->isHighlighted(), die->getColor(), die->hasBeenDisplayed(), die->getFaces()); + // qDebug() << die->getListValue() << die->getFaces() << die->getUuid() << list.size(); if(!alreadyAdded.contains(die->getUuid())) { list.append(hlDice); alreadyAdded.insert(die->getUuid()); } } + // qDebug() << "End of loop" << list.size(); if(!list.isEmpty()) nodeResult.insert(faces, list); } - result= result->getPrevious(); + if(nodeResult.isEmpty()) + result= result->getPrevious(); + else + result= nullptr; } + // qDebug() << "end"; resultList.append(nodeResult); } // qDebug() << resultList.size(); |