From 43f1be9c06805284fa4630ddacde8de3b78205ae Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Sun, 19 Feb 2023 23:10:04 -0800 Subject: [PATCH] track: removed old code --- app/node/output/track/track.cpp | 131 +------------------------------- 1 file changed, 1 insertion(+), 130 deletions(-) diff --git a/app/node/output/track/track.cpp b/app/node/output/track/track.cpp index 090e8d6c1..4c82c06a9 100644 --- a/app/node/output/track/track.cpp +++ b/app/node/output/track/track.cpp @@ -199,142 +199,13 @@ void Track::SetTrackHeight(const double &height) emit TrackHeightChanged(track_height_); } -/*void Track::InputConnectedEvent(const QString &input, int element, Node *output) -{ - if (input == kBlockInput) { - if (element == -1) { - // User has replaced the entire array, we will invalidate everything - InvalidateAll(kBlockInput, element); - return; - } - - // Check if a block was connected, if not, ignore - Block* block = dynamic_cast(output); - - if (!block) { - return; - } - - // Determine where in the cache this block will be - int cache_index = -1; - Block *previous = nullptr, *next = nullptr; - - int arr_sz = InputArraySize(kBlockInput); - for (int i=element+1; i= 0) { - next = blocks_.at(cache_index); - break; - } - } - - // If there was no next, this will be inserted at the end - if (cache_index == -1) { - cache_index = blocks_.size(); - } - - // Determine previous block, either by using next's previous or the last block if there was no - // next. If there are neither, they'll both remain null - if (next) { - previous = next->previous(); - } else if (!blocks_.isEmpty()) { - previous = blocks_.last(); - } - - // Insert at index - blocks_.insert(cache_index, block); - block_array_indexes_.insert(cache_index, element); - - // Update previous/next - if (previous) { - previous->set_next(block); - block->set_previous(previous); - } - - if (next) { - block->set_next(next); - next->set_previous(block); - } - - block->set_track(this); - - // Update ins/outs - UpdateInOutFrom(cache_index); - - // Connect to the block - connect(block, &Block::LengthChanged, this, &Track::BlockLengthChanged); - - // Invalidate cache now that block should have an in point - Node::InvalidateCache(TimeRange(block->in(), track_length()), kBlockInput); - - // Emit block added signal - emit BlockAdded(block); - } -} - -void Track::InputDisconnectedEvent(const QString &input, int element, Node *output) -{ - if (input == kBlockInput) { - if (element == -1) { - // User has replaced the entire array, we will invalidate everything - InvalidateAll(kBlockInput, element); - return; - } - - Block* b = dynamic_cast(output); - - if (!b) { - return; - } - - emit BlockRemoved(b); - - TimeRange invalidate_range(b->in(), track_length()); - - // Get cache index - int cache_index = GetCacheIndexFromArrayIndex(element); - - // Remove block here - blocks_.removeAt(cache_index); - block_array_indexes_.removeAt(cache_index); - - // Update previous/nexts - Block* previous = b->previous(); - Block* next = b->next(); - - if (previous) { - previous->set_next(next); - } - - if (next) { - next->set_previous(previous); - } - - b->set_previous(nullptr); - b->set_next(nullptr); - b->set_track(nullptr); - - // Update lengths - if (next) { - UpdateInOutFrom(blocks_.indexOf(next)); - } - emit TrackLengthChanged(); - - disconnect(b, &Block::LengthChanged, this, &Track::BlockLengthChanged); - - Node::InvalidateCache(invalidate_range, kBlockInput); - } -}*/ - void Track::InputValueChangedEvent(const QString &input, int element) { Q_UNUSED(element) if (input == kMutedInput) { emit MutedChanged(IsMuted()); - } else if (input == kArrayMapInput) { + } else if (false && input == kArrayMapInput) { if (ignore_arraymap_ > 0) { qDebug() << "ignored our own array map update"; ignore_arraymap_--;