[vlmc-devel] SequenceWorkflow: Don' t move if the position is the same as the new position
Yikai Lu
git at videolan.org
Fri Aug 12 16:52:32 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Aug 8 19:19:14 2016 -0500| [fb435d46cc09b627c01dac71c96bc5395394e5ee] | committer: Yikai Lu
SequenceWorkflow: Don't move if the position is the same as the new position
> https://code.videolan.org/videolan/vlmc/commit/fb435d46cc09b627c01dac71c96bc5395394e5ee
---
src/Workflow/SequenceWorkflow.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/Workflow/SequenceWorkflow.cpp b/src/Workflow/SequenceWorkflow.cpp
index 15b7b27..973c9da 100644
--- a/src/Workflow/SequenceWorkflow.cpp
+++ b/src/Workflow/SequenceWorkflow.cpp
@@ -109,6 +109,9 @@ SequenceWorkflow::moveClip( const QUuid& uuid, quint32 trackId, qint64 pos )
}
auto clip = std::get<ClipTupleIndex::Clip>( it.value() );
auto oldTrackId = std::get<ClipTupleIndex::TrackId>( it.value() );
+ auto oldPosition = std::get<ClipTupleIndex::Position>( it.value() );
+ if ( oldPosition == pos )
+ return true;
auto track = trackFromFormats( oldTrackId, clip->formats() );
bool ret = true;
if ( trackId != oldTrackId )
More information about the Vlmc-devel
mailing list