[vlmc-devel] Timeline: Clean selectedClips unconditionally
Yikai Lu
git at videolan.org
Sat Jul 23 12:06:24 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Jul 23 17:58:12 2016 +0900| [516867cdff38644a458d7e55b0c414845bb64e01] | committer: Yikai Lu
Timeline: Clean selectedClips unconditionally
> https://code.videolan.org/videolan/vlmc/commit/516867cdff38644a458d7e55b0c414845bb64e01
---
src/Gui/timeline/Clip.qml | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/Gui/timeline/Clip.qml b/src/Gui/timeline/Clip.qml
index 455f753..db53fb3 100644
--- a/src/Gui/timeline/Clip.qml
+++ b/src/Gui/timeline/Clip.qml
@@ -254,24 +254,23 @@ Rectangle {
}
onSelectedChanged: {
+ for ( var i = 0; i < selectedClips.length; ++i )
+ if ( !selectedClips[i] || selectedClips[i] === clip ) {
+ selectedClips.splice( i, 1 );
+ --i;
+ }
+
if ( selected === true ) {
selectedClips.push( clip );
var group = findGroup( uuid );
- for ( var i = 0; i < ( group ? group.length : 0 ); ++i ) {
+ for ( i = 0; i < ( group ? group.length : 0 ); ++i ) {
var clipItem = findClipItem( group[i] );
if ( clipItem )
clipItem.selected = true;
}
selectLinkedClip();
}
- else {
- for ( i = 0; i < selectedClips.length; ++i )
- if ( !selectedClips[i] || selectedClips[i] === clip ) {
- selectedClips.splice( i, 1 );
- --i;
- }
- }
}
states: [
More information about the Vlmc-devel
mailing list