diff options
| author | 2020-09-12 15:59:02 +0200 | |
|---|---|---|
| committer | 2020-09-12 15:59:02 +0200 | |
| commit | 2e6f5d9174b1ade9d3c3ff4a81b210313480a104 (patch) | |
| tree | e2cba1c6c0ace0ce5b5f4bd3a845167ed8b14a1f /node | |
| parent | 1f1ce3016fe8589d5b182e244e00333a1f35f1d0 (diff) | |
| download | OneRoll-2e6f5d9174b1ade9d3c3ff4a81b210313480a104.tar.gz OneRoll-2e6f5d9174b1ade9d3c3ff4a81b210313480a104.zip | |
fix output change.
Diffstat (limited to 'node')
| -rw-r--r-- | node/filternode.cpp | 1 | ||||
| -rw-r--r-- | node/keepdiceexecnode.h | 2 | ||||
| -rw-r--r-- | node/mergenode.cpp | 9 |
3 files changed, 10 insertions, 2 deletions
diff --git a/node/filternode.cpp b/node/filternode.cpp index 4424b4b..b72b6e1 100644 --- a/node/filternode.cpp +++ b/node/filternode.cpp @@ -47,6 +47,7 @@ void FilterNode::run(ExecutionNode* previous) for(Die* tmp : diceList) { tmp->setHighlighted(false); + tmp->setDisplayed(true); } m_diceResult->setResultList(diceList2); diff --git a/node/keepdiceexecnode.h b/node/keepdiceexecnode.h index 41d157d..49680f2 100644 --- a/node/keepdiceexecnode.h +++ b/node/keepdiceexecnode.h @@ -40,7 +40,7 @@ public: virtual ExecutionNode* getCopy() const; private: - qint64 m_numberOfDice; + qint64 m_numberOfDice= 0; DiceResult* m_diceResult; }; diff --git a/node/mergenode.cpp b/node/mergenode.cpp index 51a5024..441d306 100644 --- a/node/mergenode.cpp +++ b/node/mergenode.cpp @@ -21,6 +21,8 @@ ***************************************************************************/ #include "mergenode.h" +#include "parsingtoolbox.h" + MergeNode::MergeNode() : m_diceResult(new DiceResult()) { m_result= m_diceResult; @@ -41,7 +43,10 @@ void MergeNode::run(ExecutionNode* previous) { ExecutionNode* last= getLatestNode(start); if(nullptr == last || nullptr == previousLast) + { + previousLast= last; continue; + } auto startResult= start->getResult(); if(nullptr == startResult) @@ -55,7 +60,7 @@ void MergeNode::run(ExecutionNode* previous) while(nullptr != tmpResult) { DiceResult* dice= dynamic_cast<DiceResult*>(tmpResult); - if(nullptr == dice) + if(nullptr != dice) { ///@todo TODO improve here to set homogeneous while is really m_diceResult->setHomogeneous(false); @@ -93,11 +98,13 @@ void MergeNode::run(ExecutionNode* previous) m_nextNode->run(this); } } +#include <QDebug> ExecutionNode* MergeNode::getLatestNode(ExecutionNode* node) { ExecutionNode* next= node; while(nullptr != next->getNextNode() && (next->getNextNode() != this)) { + qDebug() << "find latest node" << next->toString(true) << next->getNextNode()->toString(true); next= next->getNextNode(); } return next; |