Skip to content
Snippets Groups Projects
Commit cc83a1e5 authored by Martin Hanzik's avatar Martin Hanzik Committed by Jan Trávníček
Browse files

Fixes

parent 5a9a22cb
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ InputConnectionBox::InputConnectionBox(GraphicsBox* parent, size_t slot) ...@@ -6,7 +6,7 @@ InputConnectionBox::InputConnectionBox(GraphicsBox* parent, size_t slot)
{} {}
   
void InputConnectionBox::setConnection(Connection* connection) { void InputConnectionBox::setConnection(Connection* connection) {
Q_ASSERT(!this->connection); Q_ASSERT((this->connection == nullptr) != (connection == nullptr));
this->connection = connection; this->connection = connection;
} }
   
......
...@@ -59,7 +59,7 @@ void MainWindow::on_RunBtn_clicked() ...@@ -59,7 +59,7 @@ void MainWindow::on_RunBtn_clicked()
try { try {
#if 0 #if 0
ModelBox::clearCachedResults(); ModelBox::clearCachedResults();
result = this->outputBox->getModelBox()->run(); result = this->outputBox->getModelBox()->evaluate();
#else #else
result = ParallelExecutor::execute(dynamic_cast<OutputModelBox*>(this->outputBox->getModelBox())); result = ParallelExecutor::execute(dynamic_cast<OutputModelBox*>(this->outputBox->getModelBox()));
#endif #endif
......
...@@ -10,7 +10,8 @@ std::shared_ptr<abstraction::OperationAbstraction> OutputModelBox::evaluate() { ...@@ -10,7 +10,8 @@ std::shared_ptr<abstraction::OperationAbstraction> OutputModelBox::evaluate() {
assert(this->inputs.size() == 1); assert(this->inputs.size() == 1);
if (!this->inputs[0]) if (!this->inputs[0])
return nullptr; return nullptr;
return inputs[0]->getCachedResultOrEvaluate(); this->result = inputs[0]->getCachedResultOrEvaluate();
return this->result;
} }
   
std::string OutputModelBox::getName() const { std::string OutputModelBox::getName() const {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment