minor code enhancements

This commit is contained in:
itsmattkc
2021-01-18 16:33:49 +11:00
parent 9bc0629346
commit cb1accaf0c
3 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -473,7 +473,7 @@ signals:
*/
void LabelChanged(const QString& s);
protected slots:
public slots:
void InputChanged(const olive::TimeRange &range, int element);
void InputConnectionChanged(Node* source, int element);
+2 -2
View File
@@ -596,6 +596,8 @@ void Track::BlockDisconnected(Node* node, int element)
return;
}
emit BlockRemoved(b);
TimeRange invalidate_range(b->in(), track_length());
// Get cache index
@@ -605,8 +607,6 @@ void Track::BlockDisconnected(Node* node, int element)
blocks_.removeAt(cache_index);
block_array_indexes_.removeAt(cache_index);
emit BlockRemoved(b);
// Update previous/nexts
Block* previous = b->previous();
Block* next = b->next();
+13
View File
@@ -66,6 +66,8 @@ public:
return track_input_;
}
ViewerOutput* parent() const;
signals:
void TrackListChanged();
@@ -82,6 +84,17 @@ private:
* @brief A cache of connected Tracks
*/
QVector<Track*> track_cache_;
QVector<int> track_array_indexes_;
int GetArrayIndexFromCacheIndex(int index) const
{
return track_array_indexes_.at(index);
}
int GetCacheIndexFromArrayIndex(int index) const
{
return track_array_indexes_.indexOf(index);
}
NodeInput* track_input_;