Commit d72d6209 authored by luyikei's avatar luyikei

Timeline: Implement selecting clips by selectionRect

parent 8939095b
......@@ -347,6 +347,7 @@ Rectangle {
selectionRect.y = Math.min( mouseY + y, selectionRect.initPos.y );
selectionRect.width = Math.abs( mouseX + x - selectionRect.initPos.x );
selectionRect.height = Math.abs( mouseY + y - selectionRect.initPos.y );
selectionRect.selectClips();
}
}
......@@ -485,6 +486,16 @@ Rectangle {
visible: false
color: "#999999cc"
property point initPos
function selectClips() {
for ( var i = 0; i < allClips.length; ++i ) {
var clip = allClips[i];
var clipPos = clip.mapToItem( page, 0, 0 );
if ( ( x - clip.width < clipPos.x && clipPos.x < x + width ) &&
( y - clip.height < clipPos.y && clipPos.y < y + height ) )
clip.selected = true;
}
}
}
MessageDialog {
......
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