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
14c8779e
Commit
14c8779e
authored
Jun 08, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix lag caused by monitor ruler code when resizing the last clip of a long project
parent
822b1671
Pipeline
#22987
passed with stage
in 9 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/monitor/view/MonitorRuler.qml
View file @
14c8779e
...
...
@@ -36,17 +36,34 @@ Rectangle {
{
var
projectFps
=
controller
.
fps
()
root
.
timeScale
=
width
/
root
.
duration
if
(
root
.
duration
<
10
*
projectFps
)
{
root
.
frameSize
=
projectFps
*
root
.
timeScale
*
0.2
}
else
if
(
duration
<
100
*
projectFps
)
{
var
displayedLength
=
root
.
duration
/
projectFps
;
if
(
displayedLength
<
2
)
{
// 1 frame tick
root
.
frameSize
=
root
.
timeScale
}
else
if
(
displayedLength
<
30
)
{
// 1 second tick
frameSize
=
projectFps
*
root
.
timeScale
}
else
if
(
duration
<
400
*
projectFps
)
{
root
.
frameSize
=
projectFps
*
root
.
timeScale
*
2
}
else
if
(
displayedLength
<
150
)
{
// 5 second tick
frameSize
=
5
*
projectFps
*
root
.
timeScale
}
else
if
(
displayedLength
<
300
)
{
// 10 second tick
frameSize
=
10
*
projectFps
*
root
.
timeScale
}
else
if
(
displayedLength
<
900
)
{
// 30 second tick
frameSize
=
30
*
projectFps
*
root
.
timeScale
}
else
if
(
displayedLength
<
1800
)
{
// 1 min. tick
frameSize
=
60
*
projectFps
*
root
.
timeScale
}
else
if
(
displayedLength
<
9000
)
{
// 5 min tick
frameSize
=
300
*
projectFps
*
root
.
timeScale
}
else
if
(
displayedLength
<
18000
)
{
// 10 min tick
frameSize
=
600
*
projectFps
*
root
.
timeScale
}
else
{
root
.
frameSize
=
projectFps
*
root
.
timeScale
*
4
while
(
root
.
frameSize
<
10
)
{
root
.
frameSize
*=
4
}
// 30 min tick
frameSize
=
18000
*
projectFps
*
root
.
timeScale
}
}
...
...
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