Commit e7638efd authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix audio thumbs sometimes not appearing on clip quick insert

CCBUG: 417110
parent 8cce530d
Pipeline #16307 failed with stage
in 2 minutes and 23 seconds
...@@ -201,6 +201,7 @@ void ProjectClip::updateAudioThumbnail(const QVector<uint8_t> audioLevels) ...@@ -201,6 +201,7 @@ void ProjectClip::updateAudioThumbnail(const QVector<uint8_t> audioLevels)
{ {
audioFrameCache = audioLevels; audioFrameCache = audioLevels;
m_audioThumbCreated = true; m_audioThumbCreated = true;
updateTimelineClips({TimelineModel::ReloadThumbRole});
} }
bool ProjectClip::audioThumbCreated() const bool ProjectClip::audioThumbCreated() const
......
...@@ -136,7 +136,7 @@ Rectangle { ...@@ -136,7 +136,7 @@ Rectangle {
width = clipDuration * timeScale; width = clipDuration * timeScale;
if (parentTrack && parentTrack.isAudio && thumbsLoader.item) { if (parentTrack && parentTrack.isAudio && thumbsLoader.item) {
// Duration changed, we may need a different number of repeaters // Duration changed, we may need a different number of repeaters
thumbsLoader.item.reload() thumbsLoader.item.reload(1)
} }
} }
...@@ -163,7 +163,7 @@ Rectangle { ...@@ -163,7 +163,7 @@ Rectangle {
onForceReloadThumbChanged: { onForceReloadThumbChanged: {
// TODO: find a way to force reload of clip thumbs // TODO: find a way to force reload of clip thumbs
if (thumbsLoader.item) { if (thumbsLoader.item) {
thumbsLoader.item.reload() thumbsLoader.item.reload(0)
} }
} }
......
...@@ -16,7 +16,10 @@ Row { ...@@ -16,7 +16,10 @@ Row {
onTriggered: processReload() onTriggered: processReload()
} }
function reload() { function reload(reset) {
if (reset == 0) {
waveformRepeater.model = 0
}
waveTimer.start() waveTimer.start()
} }
onMaxWidthChanged: { onMaxWidthChanged: {
......
...@@ -13,8 +13,8 @@ Row { ...@@ -13,8 +13,8 @@ Row {
property int thumbWidth: container.height * root.dar property int thumbWidth: container.height * root.dar
property bool enableCache: clipRoot.itemType == ProducerType.Video || clipRoot.itemType == ProducerType.AV property bool enableCache: clipRoot.itemType == ProducerType.Video || clipRoot.itemType == ProducerType.AV
function reload() { function reload(reset) {
console.log('+++++\n\ntriggered ML thumb reload\n\n++++++++++++++') //console.log('+++++\n\ntriggered ML thumb reload\n\n++++++++++++++')
clipRoot.baseThumbPath = clipRoot.variableThumbs ? '' : 'image://thumbnail/' + clipRoot.binId + '/' + Math.random() + '/#' clipRoot.baseThumbPath = clipRoot.variableThumbs ? '' : 'image://thumbnail/' + clipRoot.binId + '/' + Math.random() + '/#'
} }
......
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