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)
{
audioFrameCache = audioLevels;
m_audioThumbCreated = true;
updateTimelineClips({TimelineModel::ReloadThumbRole});
}
bool ProjectClip::audioThumbCreated() const
......
......@@ -136,7 +136,7 @@ Rectangle {
width = clipDuration * timeScale;
if (parentTrack && parentTrack.isAudio && thumbsLoader.item) {
// Duration changed, we may need a different number of repeaters
thumbsLoader.item.reload()
thumbsLoader.item.reload(1)
}
}
......@@ -163,7 +163,7 @@ Rectangle {
onForceReloadThumbChanged: {
// TODO: find a way to force reload of clip thumbs
if (thumbsLoader.item) {
thumbsLoader.item.reload()
thumbsLoader.item.reload(0)
}
}
......
......@@ -16,7 +16,10 @@ Row {
onTriggered: processReload()
}
function reload() {
function reload(reset) {
if (reset == 0) {
waveformRepeater.model = 0
}
waveTimer.start()
}
onMaxWidthChanged: {
......
......@@ -13,8 +13,8 @@ Row {
property int thumbWidth: container.height * root.dar
property bool enableCache: clipRoot.itemType == ProducerType.Video || clipRoot.itemType == ProducerType.AV
function reload() {
console.log('+++++\n\ntriggered ML thumb reload\n\n++++++++++++++')
function reload(reset) {
//console.log('+++++\n\ntriggered ML thumb reload\n\n++++++++++++++')
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