timeline: optimized rippling workarea, rippling to in/out, and the ripple tool

Use cache shift functionality introduced in previous commit to optimize
timeline usage.
This commit is contained in:
itsmattkc
2020-06-02 04:24:12 +10:00
parent 11bfe61208
commit f2050a0342
6 changed files with 403 additions and 83 deletions
+9 -4
View File
@@ -244,10 +244,7 @@ const QList<Block *> &TrackOutput::Blocks() const
void TrackOutput::InvalidateCache(const TimeRange &range, NodeInput *from, NodeInput *source)
{
if (block_invalidate_cache_stack_ == 0) {
if (queued_length_change_) {
queued_length_change_ = false;
SetLengthInternal(queued_length_);
}
PushLengthChangeSignal();
Node::InvalidateCache(TimeRange(qMax(range.in(), rational(0)), qMin(range.out(), track_length())), from, source);
}
@@ -437,6 +434,14 @@ void TrackOutput::Hash(QCryptographicHash &hash, const rational &time) const
}
}
void TrackOutput::PushLengthChangeSignal()
{
if (queued_length_change_) {
queued_length_change_ = false;
SetLengthInternal(queued_length_);
}
}
void TrackOutput::SetTrackName(const QString &name)
{
track_name_ = name;
+2
View File
@@ -193,6 +193,8 @@ public:
virtual void Hash(QCryptographicHash& hash, const rational &time) const override;
void PushLengthChangeSignal();
public slots:
void SetTrackName(const QString& name);