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
+2 -2
View File
@@ -82,7 +82,7 @@ void RippleTool::InitiateDrag(Block *clicked_item,
if (block_after_ripple) {
TimelineViewGhostItem* ghost;
if (block_after_ripple->type() == Block::kGap) {
if (dynamic_cast<GapBlock*>(block_after_ripple)) {
// If this Block is already a Gap, ghost it now
ghost = AddGhostFromBlock(block_after_ripple, trim_mode);
} else {
@@ -90,7 +90,7 @@ void RippleTool::InitiateDrag(Block *clicked_item,
// or we'll have to create a new gap ourselves
Block* previous = block_after_ripple->previous();
if (previous && previous->type() == Block::kGap) {
if (dynamic_cast<GapBlock*>(previous)) {
// Previous is a gap, that'll make a fine substitute
ghost = AddGhostFromBlock(previous, trim_mode);
} else {