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

Don't trigger actions to linked clips from the UI

parent 0cdd5382
......@@ -57,12 +57,7 @@ Rectangle {
function resize() {
// This function updates Backend
var _length = selectedClips.length;
for ( var i = _length - 1; i >= 0; --i ) {
if ( selectedClips[i] ) {
workflow.resizeClip( selectedClips[i].uuid, begin, end, position );
}
}
workflow.resizeClip( uuid, begin, end, position );
}
function selectLinkedClip() {
......@@ -347,9 +342,7 @@ Rectangle {
if ( resizing === true && isCutMode === false )
resize();
else if ( dragArea.drag.active )
{
dragFinished();
}
}
states: [
......
......@@ -293,12 +293,7 @@ Rectangle {
}
function dragFinished() {
var _length = selectedClips.length;
for ( var i = _length - 1; i >= 0; --i ) {
if ( selectedClips[i] ) {
selectedClips[i].move();
}
}
selectedClips[0].move();
adjustTracks( "Audio" );
adjustTracks( "Video" );
}
......@@ -544,8 +539,7 @@ Rectangle {
icon: StandardIcon.Question
standardButtons: StandardButton.Yes | StandardButton.No
onYes: {
while ( selectedClips.length )
workflow.removeClip( selectedClips[0].uuid );
workflow.removeClip( selectedClips[0].uuid );
}
}
......
......@@ -241,19 +241,28 @@ MainWorkflow::libraryClipInfo( const QString& uuid )
void
MainWorkflow::moveClip( const QString& uuid, quint32 trackId, qint64 startFrame )
{
auto clip = m_sequenceWorkflow->clip( uuid );
trigger( new Commands::Clip::Move( m_sequenceWorkflow, uuid, trackId, startFrame ) );
for ( const auto& lcUuid : clip->linkedClips )
trigger( new Commands::Clip::Move( m_sequenceWorkflow, lcUuid.toString(), trackId, startFrame ) );
}
void
MainWorkflow::resizeClip( const QString& uuid, qint64 newBegin, qint64 newEnd, qint64 newPos )
{
auto clip = m_sequenceWorkflow->clip( uuid );
trigger( new Commands::Clip::Resize( m_sequenceWorkflow, uuid, newBegin, newEnd, newPos ) );
for ( const auto& lcUuid : clip->linkedClips )
trigger( new Commands::Clip::Resize( m_sequenceWorkflow, lcUuid, newBegin, newEnd, newPos ) );
}
void
MainWorkflow::removeClip( const QString& uuid )
{
auto clip = m_sequenceWorkflow->clip( uuid );
trigger( new Commands::Clip::Remove( m_sequenceWorkflow, uuid ) );
for ( const auto& lcUuid : clip->linkedClips )
trigger( new Commands::Clip::Remove( m_sequenceWorkflow, lcUuid ) );
}
void
......
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