Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Don't try to draw audio thumbnails when disabled.

Currently audio thumbs cause a major slowdows on high zoom.
That should be fixed, best way is probably to use qml canvas instead of
QQuickPaintedItem and clip to only visible region
parent 2461e97a
......@@ -168,9 +168,12 @@ Rectangle {
function generateWaveform() {
// This is needed to make the model have the correct count.
// Model as a property expression is not working in all cases.
waveformRepeater.model = Math.ceil(waveform.innerWidth / waveform.maxWidth)
for (var i = 0; i < waveformRepeater.count; i++) {
waveformRepeater.itemAt(0).update()
if (timeline.showAudioThumbnails) {
waveformRepeater.model = Math.ceil(waveform.innerWidth / waveform.maxWidth)
for (var i = 0; i < waveformRepeater.count; i++) {
// This looks suspicious. Why not itemAt(i) ?? code borrowed from Shotcut
waveformRepeater.itemAt(0).update();
}
}
}
......
......@@ -48,6 +48,8 @@ public:
TimelineWaveform()
{
setAntialiasing(true);
setClip(true);
setEnabled(false);
connect(this, SIGNAL(propertyChanged()), this, SLOT(update()));
// Fill gradient
m_gradient.setStart(0, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment