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
aa8cc822
Commit
aa8cc822
authored
Jul 28, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix audio thumbnail flickering on resize / move item
Fixes
#746
parent
f68fb0cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/timelineitems.cpp
View file @
aa8cc822
...
...
@@ -155,6 +155,7 @@ public:
pen
.
setWidthF
(
0
);
}
painter
->
setPen
(
pen
);
int
startPos
=
m_inPoint
/
indicesPrPixel
;
if
(
!
KdenliveSettings
::
displayallchannels
())
{
// Draw merged channels
double
i
=
0
;
...
...
@@ -169,7 +170,7 @@ public:
}
for
(;
i
<=
width
()
&&
i
<
m_drawOutPoint
;
j
++
)
{
i
=
j
*
increment
;
int
idx
=
m_precisionFactor
*
m_inPoint
+
int
(
i
*
indicesPrPixel
);
int
idx
=
ceil
((
startPos
+
i
)
*
indicesPrPixel
);
idx
+=
idx
%
m_channels
;
i
-=
offset
;
if
(
idx
+
m_channels
>=
m_audioLevels
.
length
()
||
idx
<
0
)
{
...
...
@@ -228,7 +229,7 @@ public:
}
for
(;
i
<=
width
()
&&
i
<
m_drawOutPoint
;
j
++
)
{
i
=
j
*
increment
;
int
idx
=
m_precisionFactor
*
m_inPoint
+
ceil
(
i
*
indicesPrPixel
);
int
idx
=
ceil
((
startPos
+
i
)
*
indicesPrPixel
);
idx
+=
idx
%
m_channels
;
i
-=
offset
;
idx
+=
channel
;
...
...
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