implemented 'ripple to' timeline actions

This commit is contained in:
itsmattkc
2019-09-24 22:45:30 +10:00
parent c33a0b50ce
commit cf3e8d80d1
17 changed files with 219 additions and 82 deletions
+7
View File
@@ -221,3 +221,10 @@ rational Block::MediaToSequenceTime(const rational &media_time)
return media_time - media_in() + in();
}
void Block::CopyParameters(Block *source, Block *dest)
{
dest->set_block_name(source->block_name());
dest->set_length(source->length());
dest->set_media_in(source->media_in());
}
+2
View File
@@ -102,6 +102,8 @@ protected:
rational MediaToSequenceTime(const rational& media_time);
static void CopyParameters(Block* source, Block* dest);
private:
NodeInput* previous_input_;
NodeOutput* block_output_;
+1 -2
View File
@@ -33,8 +33,7 @@ Block *ClipBlock::copy()
{
ClipBlock* c = new ClipBlock();
c->set_block_name(block_name());
c->set_length(length());
CopyParameters(this, c);
return c;
}
+1 -2
View File
@@ -28,8 +28,7 @@ Block *GapBlock::copy()
{
GapBlock* c = new GapBlock();
c->set_block_name(block_name());
c->set_length(length());
CopyParameters(this, c);
return c;
}
+2 -2
View File
@@ -151,7 +151,7 @@ Block *TrackOutput::NearestBlockBefore(const rational &time)
}
}
return nullptr;
return this;
}
Block *TrackOutput::NearestBlockAfter(const rational &time)
@@ -163,7 +163,7 @@ Block *TrackOutput::NearestBlockAfter(const rational &time)
}
}
return nullptr;
return this;
}
const QVector<Block *> &TrackOutput::Blocks()