minor code enhancements
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user