Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
c63280d4
Commit
c63280d4
authored
Mar 24, 2021
by
Jean-Baptiste Mardelle
Browse files
Improve timeline zone snapping when moving with mouse
parent
b74e65dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/RulerZone.qml
View file @
c63280d4
...
...
@@ -84,6 +84,18 @@ Rectangle {
var
offset
=
Math
.
round
(
mouseX
/
timeline
.
scaleFactor
)
if
(
offset
!=
0
)
{
var
newPos
=
Math
.
max
(
0
,
controller
.
suggestSnapPoint
(
frameIn
+
offset
,
root
.
snapping
))
if
(
newPos
==
frameIn
+
offset
)
{
// No snap at start, check end
var
newPos
=
Math
.
max
(
0
,
controller
.
suggestSnapPoint
(
frameOut
+
offset
,
root
.
snapping
))
if
(
newPos
==
frameOut
+
offset
)
{
newPos
=
frameIn
+
offset
}
else
{
newPos
=
frameIn
+
(
newPos
-
frameOut
)
}
}
if
(
newPos
<
0
)
{
newPos
=
frameIn
+
offset
;
}
frameOut
+=
newPos
-
frameIn
frameIn
=
newPos
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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