Merge branch 'master' into new-audio-cache

This commit is contained in:
itsmattkc
2021-09-27 11:18:03 -07:00
4 changed files with 22 additions and 11 deletions
+7
View File
@@ -980,6 +980,13 @@ void NodeView::OpenSelectedNodeInViewer()
void NodeView::RemoveNode(Node *node)
{
for (auto it=attached_items_.begin(); it!=attached_items_.end(); ) {
if (it->item->GetNode() == node) {
it = attached_items_.erase(it);
} else {
it++;
}
}
for (const Node::OutputConnection &oc : node->output_connections()) {
scene_.RemoveEdge(oc.first, oc.second);
}
+5 -1
View File
@@ -721,10 +721,13 @@ void PointerTool::InitiateDrag(Block *clicked_item,
TimelineViewGhostItem* PointerTool::AddGhostFromBlock(Block* block, Timeline::MovementMode mode, bool check_if_exists)
{
if (!block) {
// Ignore null blocks or blocks that aren't attached to a track because there's nothing we can
// do with either of those
if (!block || !block->track()) {
return nullptr;
}
// Check if we've already made a ghost for this block
if (check_if_exists) {
foreach (TimelineViewGhostItem* ghost, parent()->GetGhostItems()) {
if (Node::ValueToPtr<Block>(ghost->GetData(TimelineViewGhostItem::kAttachedBlock)) == block) {
@@ -733,6 +736,7 @@ TimelineViewGhostItem* PointerTool::AddGhostFromBlock(Block* block, Timeline::Mo
}
}
// Otherwise, it's time to make a ghost for this block
TimelineViewGhostItem* ghost = TimelineViewGhostItem::FromBlock(block);
#ifdef HIDE_GAP_GHOSTS