remove block enum

Replaced with dynamic casts.
This commit is contained in:
itsmattkc
2021-04-22 11:50:24 +10:00
parent 50644b8e10
commit 269fa6d905
16 changed files with 40 additions and 86 deletions
@@ -384,7 +384,7 @@ void TimelineView::DrawBlocks(QPainter *painter, bool foreground)
Block* block = track->NearestBlockBeforeOrAt(start_time);
while (block) {
if (block->type() == Block::kClip || block->type() == Block::kTransition) {
if (dynamic_cast<ClipBlock*>(block) || dynamic_cast<TransitionBlock*>(block)) {
qreal block_left = qMax(left_bound, TimeToScene(block->in()));
qreal block_right = qMin(right_bound, TimeToScene(block->out())) - 1;