Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
d72d6209
Commit
d72d6209
authored
Jul 30, 2016
by
luyikei
Browse files
Timeline: Implement selecting clips by selectionRect
parent
8939095b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Gui/timeline/main.qml
View file @
d72d6209
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment