Commit e5d6bf87 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Emit clipLinked/clipUnlinked from SequenceWorkflow

parent 6a7b614a
......@@ -368,9 +368,7 @@ void
Commands::Clip::Link::internalRedo()
{
auto ret = m_workflow->linkClips( m_clipA, m_clipB );
if ( ret == true )
emit Core::instance()->workflow()->clipLinked( m_clipA.toString(), m_clipB.toString() );
else
if ( ret == false )
invalidate();
}
......@@ -378,9 +376,7 @@ void
Commands::Clip::Link::internalUndo()
{
auto ret = m_workflow->unlinkClips( m_clipA, m_clipB );
if ( ret == true )
emit Core::instance()->workflow()->clipUnlinked( m_clipA.toString(), m_clipB.toString() );
else
if ( ret == false )
invalidate();
}
......
......@@ -628,6 +628,11 @@ Rectangle {
findClipItem( uuidB ).linkedClip = uuidA;
}
onClipUnLinked: {
findClipItem( uuidA ).linkedClip = null;
findClipItem( uuidB ).linkedClip = null;
}
onEffectsUpdated: {
var item = findClipItem( clipUuid );
if ( item )
......
......@@ -64,6 +64,7 @@ MainWorkflow::MainWorkflow( Settings* projectSettings, int trackCount ) :
connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipAdded, this, &MainWorkflow::clipAdded );
connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipRemoved, this, &MainWorkflow::clipRemoved );
connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipLinked, this, &MainWorkflow::clipLinked );
connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipUnlinked, this, &MainWorkflow::clipUnlinked );
connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipMoved, this, &MainWorkflow::clipMoved );
connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipResized, this, &MainWorkflow::clipResized );
m_renderer->setInput( m_sequenceWorkflow->input() );
......
......@@ -201,6 +201,8 @@ SequenceWorkflow::unlinkClips( const QUuid& uuidA, const QUuid& uuidB )
ret = false;
vlmcWarning() << "Failed to unlink" << uuidA << "from Clip instance" << uuidB;
}
if ( ret == true )
emit clipUnlinked( uuidA.toString(), uuidB.toString() );
return ret;
}
......
......@@ -115,6 +115,7 @@ class SequenceWorkflow : public QObject
void clipAdded( QString );
void clipRemoved( QString );
void clipLinked( QString, QString );
void clipUnlinked( QString, QString );
void clipMoved( QString );
void clipResized( QString );
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment