changed refresh system slightly and added include dirs for deps
This commit is contained in:
@@ -70,7 +70,7 @@ void Block::set_length(const rational &length)
|
||||
|
||||
Unlock();
|
||||
|
||||
RefreshFollowing();
|
||||
Refresh();
|
||||
}
|
||||
|
||||
Block *Block::previous()
|
||||
@@ -106,7 +106,7 @@ void Block::EdgeAddedSlot(NodeEdgePtr edge)
|
||||
static_cast<Block*>(edge->output()->parent())->next_ = this;
|
||||
|
||||
// The blocks surrounding this one have changed, we need to Refresh()
|
||||
RefreshFollowing();
|
||||
Refresh();
|
||||
|
||||
// Entire track will have shifted, so the whole cache needs to be re-validated
|
||||
SendInvalidateCache(0, RATIONAL_MAX);
|
||||
@@ -119,7 +119,7 @@ void Block::EdgeRemovedSlot(NodeEdgePtr edge)
|
||||
static_cast<Block*>(edge->output()->parent())->next_ = nullptr;
|
||||
|
||||
// The blocks surrounding this one have changed, we need to Refresh()
|
||||
RefreshFollowing();
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,18 +136,9 @@ void Block::Refresh()
|
||||
out_point_ = in_point_ + length();
|
||||
|
||||
emit Refreshed();
|
||||
}
|
||||
|
||||
void Block::RefreshFollowing()
|
||||
{
|
||||
Refresh();
|
||||
|
||||
Block* next_block = next();
|
||||
|
||||
while (next_block != nullptr) {
|
||||
next_block->Refresh();
|
||||
|
||||
next_block = next_block->next();
|
||||
if (next() != nullptr) {
|
||||
next()->Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -83,11 +83,6 @@ public slots:
|
||||
*/
|
||||
virtual void Refresh();
|
||||
|
||||
/**
|
||||
* @brief Calls Refresh() on this block and all blocks connected after it (but not before it)
|
||||
*/
|
||||
void RefreshFollowing();
|
||||
|
||||
signals:
|
||||
/**
|
||||
* @brief Signal emitted when this Block is refreshed
|
||||
|
||||
@@ -104,6 +104,7 @@ void TrackOutput::Refresh()
|
||||
block_cache_ = detect_attached_blocks;
|
||||
|
||||
Block::Refresh();
|
||||
qDebug() << "Refreshed with in point" << in().toDouble() << "(from connected block" << previous << ")";
|
||||
}
|
||||
|
||||
QList<NodeDependency> TrackOutput::RunDependencies(NodeOutput* output, const rational &time)
|
||||
|
||||
Reference in New Issue
Block a user