Fix title clip thumbs not updated on change. Fixes #128

parent c43b03db
...@@ -1044,7 +1044,7 @@ void ProjectClip::setProperties(const QMap<QString, QString> &properties, bool r ...@@ -1044,7 +1044,7 @@ void ProjectClip::setProperties(const QMap<QString, QString> &properties, bool r
updateTimelineClips(updateRoles); updateTimelineClips(updateRoles);
} }
} }
if (!passProperties.isEmpty()) { if (!passProperties.isEmpty() && (!reload || refreshOnly)) {
if (auto ptr = m_model.lock()) emit std::static_pointer_cast<ProjectItemModel>(ptr)->updateTimelineProducers(m_binId, passProperties); if (auto ptr = m_model.lock()) emit std::static_pointer_cast<ProjectItemModel>(ptr)->updateTimelineProducers(m_binId, passProperties);
} }
} }
......
...@@ -128,6 +128,7 @@ QImage ThumbnailCache::getThumbnail(const QString &binId, int pos, bool volatile ...@@ -128,6 +128,7 @@ QImage ThumbnailCache::getThumbnail(const QString &binId, int pos, bool volatile
} }
QDir thumbFolder = getDir(&ok); QDir thumbFolder = getDir(&ok);
if (ok && thumbFolder.exists(key)) { if (ok && thumbFolder.exists(key)) {
m_storedOnDisk[binId].push_back(pos);
return QImage(thumbFolder.absoluteFilePath(key)); return QImage(thumbFolder.absoluteFilePath(key));
} }
return QImage(); return QImage();
......
...@@ -93,5 +93,5 @@ protected: ...@@ -93,5 +93,5 @@ protected:
// the following maps keeps track of the positions that we store for each clip in volatile caches. // the following maps keeps track of the positions that we store for each clip in volatile caches.
// Note that we don't track deletions due to items dropped from the cache. So the maps can contain more items that are currently stored. // Note that we don't track deletions due to items dropped from the cache. So the maps can contain more items that are currently stored.
std::unordered_map<QString, std::vector<int>> m_storedVolatile; std::unordered_map<QString, std::vector<int>> m_storedVolatile;
std::unordered_map<QString, std::vector<int>> m_storedOnDisk; mutable std::unordered_map<QString, std::vector<int>> m_storedOnDisk;
}; };
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