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
211a9eae
Commit
211a9eae
authored
May 13, 2020
by
Jean-Baptiste Mardelle
Browse files
Improve timeline position on zoom
parent
5d18da44
Pipeline
#20104
passed with stage
in 9 minutes and 36 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/timeline.qml
View file @
211a9eae
...
...
@@ -160,6 +160,16 @@ Rectangle {
return
-
1
;
}
}
function
getMouseX
()
{
if
(
dragProxy
.
draggedItem
>
-
1
&&
dragProxy
.
masterObject
)
{
return
(
dragProxy
.
masterObject
.
x
+
dragProxy
.
masterObject
.
mouseXPos
)
-
scrollView
.
contentX
}
if
(
tracksArea
.
containsMouse
)
{
return
tracksArea
.
mouseX
}
else
{
return
-
1
;
}
}
function
getScrollPos
()
{
return
scrollView
.
contentX
...
...
@@ -298,7 +308,7 @@ Rectangle {
//onCurrentTrackChanged: timeline.selection = []
onTimeScaleChanged
:
{
if
(
root
.
zoomOnMouse
>=
0
)
{
scrollView
.
contentX
=
Math
.
max
(
0
,
root
.
zoomOnMouse
*
timeline
.
scaleFactor
-
tracksArea
.
m
ouseX
)
scrollView
.
contentX
=
Math
.
max
(
0
,
root
.
zoomOnMouse
*
timeline
.
scaleFactor
-
getM
ouseX
()
)
root
.
zoomOnMouse
=
-
1
}
else
{
scrollView
.
contentX
=
Math
.
max
(
0
,
root
.
consumerPosition
*
timeline
.
scaleFactor
-
(
scrollView
.
width
/
2
))
...
...
Write
Preview
Markdown
is supported
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