added ability to open viewers on any viewer node or derivative
Fixes #1362 Also fixes some other bugs that impeded this from working.
This commit is contained in:
@@ -180,7 +180,7 @@ void Footage::InputValueChangedEvent(const QString &input, int element)
|
||||
}
|
||||
}
|
||||
|
||||
rational Footage::GetCustomLength(Track::Type type) const
|
||||
rational Footage::VerifyLengthInternal(Track::Type type) const
|
||||
{
|
||||
if (type == Track::kVideo) {
|
||||
VideoParams first_stream = GetFirstEnabledVideoStream();
|
||||
@@ -196,7 +196,7 @@ rational Footage::GetCustomLength(Track::Type type) const
|
||||
}
|
||||
}
|
||||
|
||||
return super::GetCustomLength(type);
|
||||
return super::VerifyLengthInternal(type);
|
||||
}
|
||||
|
||||
QString Footage::GetColorspaceToUse(const VideoParams ¶ms) const
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
virtual QString Name() const override
|
||||
{
|
||||
return tr("Footage");
|
||||
return tr("Media");
|
||||
}
|
||||
|
||||
virtual QString id() const override
|
||||
@@ -195,7 +195,7 @@ protected:
|
||||
|
||||
virtual void InputValueChangedEvent(const QString &input, int element) override;
|
||||
|
||||
virtual rational GetCustomLength(Track::Type type) const override;
|
||||
virtual rational VerifyLengthInternal(Track::Type type) const override;
|
||||
|
||||
private:
|
||||
QString GetColorspaceToUse(const VideoParams& params) const;
|
||||
|
||||
@@ -430,9 +430,6 @@ void ProjectViewModel::ConnectItem(Node *n)
|
||||
connect(f, &Folder::BeginRemoveItem, this, &ProjectViewModel::FolderBeginRemoveItem);
|
||||
connect(f, &Folder::EndRemoveItem, this, &ProjectViewModel::FolderEndRemoveItem);
|
||||
|
||||
connect(f, &Folder::BeginInsertItem, this, &ProjectViewModel::ItemAdded);
|
||||
connect(f, &Folder::BeginRemoveItem, this, &ProjectViewModel::ItemRemoved);
|
||||
|
||||
foreach (Node* c, f->children()) {
|
||||
ConnectItem(c);
|
||||
}
|
||||
@@ -450,9 +447,6 @@ void ProjectViewModel::DisconnectItem(Node *n)
|
||||
disconnect(f, &Folder::BeginRemoveItem, this, &ProjectViewModel::FolderBeginRemoveItem);
|
||||
disconnect(f, &Folder::EndRemoveItem, this, &ProjectViewModel::FolderEndRemoveItem);
|
||||
|
||||
disconnect(f, &Folder::BeginInsertItem, this, &ProjectViewModel::ItemAdded);
|
||||
disconnect(f, &Folder::BeginRemoveItem, this, &ProjectViewModel::ItemRemoved);
|
||||
|
||||
foreach (Node* c, f->children()) {
|
||||
DisconnectItem(c);
|
||||
}
|
||||
|
||||
@@ -104,11 +104,6 @@ public:
|
||||
*/
|
||||
QModelIndex CreateIndexFromItem(Node *item, int column = 0);
|
||||
|
||||
signals:
|
||||
void ItemAdded(Node* node);
|
||||
|
||||
void ItemRemoved(Node* node);
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief Retrieve the index of `item` in its parent
|
||||
|
||||
@@ -107,7 +107,7 @@ void Sequence::Retranslate()
|
||||
}
|
||||
}
|
||||
|
||||
rational Sequence::GetCustomLength(Track::Type type) const
|
||||
rational Sequence::VerifyLengthInternal(Track::Type type) const
|
||||
{
|
||||
if (!track_lists_.isEmpty()) {
|
||||
switch (type) {
|
||||
|
||||
@@ -103,7 +103,7 @@ protected:
|
||||
|
||||
virtual void InputDisconnectedEvent(const QString &input, int element, const NodeOutput &output) override;
|
||||
|
||||
virtual rational GetCustomLength(Track::Type type) const override;
|
||||
virtual rational VerifyLengthInternal(Track::Type type) const override;
|
||||
|
||||
signals:
|
||||
void TrackAdded(Track* track);
|
||||
|
||||
Reference in New Issue
Block a user