diff --git a/src/vlivepreviewhelper.cpp b/src/vlivepreviewhelper.cpp index bdf4908a..a72bb996 100644 --- a/src/vlivepreviewhelper.cpp +++ b/src/vlivepreviewhelper.cpp @@ -169,9 +169,16 @@ void VLivePreviewHelper::updateCodeBlocks(TimeStamp p_timeStamp, const QVector &entry = it.value(); + // If this cache is not used at the last timestamp, we still need to + // update the live preview. + if (entry->m_ts < m_timeStamp - 1) { + oldCache = true; + } + entry->m_ts = m_timeStamp; cached = true; m_codeBlocks[idx].setImageData(entry->m_imgFormat, entry->m_imgData); @@ -193,7 +200,7 @@ void VLivePreviewHelper::updateCodeBlocks(TimeStamp p_timeStamp, const QVector= cursorBlock) { - if (lastIndex == idx && cached) { + if (lastIndex == idx && cached && !oldCache) { needUpdate = false; }