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 ...@@ -368,9 +368,7 @@ void
Commands::Clip::Link::internalRedo() Commands::Clip::Link::internalRedo()
{ {
auto ret = m_workflow->linkClips( m_clipA, m_clipB ); auto ret = m_workflow->linkClips( m_clipA, m_clipB );
if ( ret == true ) if ( ret == false )
emit Core::instance()->workflow()->clipLinked( m_clipA.toString(), m_clipB.toString() );
else
invalidate(); invalidate();
} }
...@@ -378,9 +376,7 @@ void ...@@ -378,9 +376,7 @@ void
Commands::Clip::Link::internalUndo() Commands::Clip::Link::internalUndo()
{ {
auto ret = m_workflow->unlinkClips( m_clipA, m_clipB ); auto ret = m_workflow->unlinkClips( m_clipA, m_clipB );
if ( ret == true ) if ( ret == false )
emit Core::instance()->workflow()->clipUnlinked( m_clipA.toString(), m_clipB.toString() );
else
invalidate(); invalidate();
} }
......
...@@ -628,6 +628,11 @@ Rectangle { ...@@ -628,6 +628,11 @@ Rectangle {
findClipItem( uuidB ).linkedClip = uuidA; findClipItem( uuidB ).linkedClip = uuidA;
} }
onClipUnLinked: {
findClipItem( uuidA ).linkedClip = null;
findClipItem( uuidB ).linkedClip = null;
}
onEffectsUpdated: { onEffectsUpdated: {
var item = findClipItem( clipUuid ); var item = findClipItem( clipUuid );
if ( item ) if ( item )
......
...@@ -64,6 +64,7 @@ MainWorkflow::MainWorkflow( Settings* projectSettings, int trackCount ) : ...@@ -64,6 +64,7 @@ MainWorkflow::MainWorkflow( Settings* projectSettings, int trackCount ) :
connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipAdded, this, &MainWorkflow::clipAdded ); connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipAdded, this, &MainWorkflow::clipAdded );
connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipRemoved, this, &MainWorkflow::clipRemoved ); connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipRemoved, this, &MainWorkflow::clipRemoved );
connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipLinked, this, &MainWorkflow::clipLinked ); 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::clipMoved, this, &MainWorkflow::clipMoved );
connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipResized, this, &MainWorkflow::clipResized ); connect( m_sequenceWorkflow.get(), &SequenceWorkflow::clipResized, this, &MainWorkflow::clipResized );
m_renderer->setInput( m_sequenceWorkflow->input() ); m_renderer->setInput( m_sequenceWorkflow->input() );
......
...@@ -201,6 +201,8 @@ SequenceWorkflow::unlinkClips( const QUuid& uuidA, const QUuid& uuidB ) ...@@ -201,6 +201,8 @@ SequenceWorkflow::unlinkClips( const QUuid& uuidA, const QUuid& uuidB )
ret = false; ret = false;
vlmcWarning() << "Failed to unlink" << uuidA << "from Clip instance" << uuidB; vlmcWarning() << "Failed to unlink" << uuidA << "from Clip instance" << uuidB;
} }
if ( ret == true )
emit clipUnlinked( uuidA.toString(), uuidB.toString() );
return ret; return ret;
} }
......
...@@ -115,6 +115,7 @@ class SequenceWorkflow : public QObject ...@@ -115,6 +115,7 @@ class SequenceWorkflow : public QObject
void clipAdded( QString ); void clipAdded( QString );
void clipRemoved( QString ); void clipRemoved( QString );
void clipLinked( QString, QString ); void clipLinked( QString, QString );
void clipUnlinked( QString, QString );
void clipMoved( QString ); void clipMoved( QString );
void clipResized( 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