Small cleanup, make placeholder timeline clips visible and allow reloading...

Small cleanup, make placeholder timeline clips visible and allow reloading missing clip if source file is available
Fixes #785
parent af0bd4f7
Pipeline #35959 passed with stage
in 26 minutes and 44 seconds
......@@ -44,7 +44,7 @@ AbstractProjectItem::AbstractProjectItem(PROJECTITEMTYPE type, QString id, const
, m_binId(std::move(id))
, m_usage(0)
, m_rating(0)
, m_clipStatus(StatusReady)
, m_clipStatus(FileStatus::StatusReady)
, m_itemType(type)
, m_lock(QReadWriteLock::Recursive)
, m_isCurrent(false)
......@@ -254,17 +254,17 @@ QPoint AbstractProjectItem::zone() const
return {};
}
void AbstractProjectItem::setClipStatus(CLIPSTATUS status)
void AbstractProjectItem::setClipStatus(FileStatus::ClipStatus status)
{
m_clipStatus = status;
}
bool AbstractProjectItem::statusReady() const
{
return m_clipStatus == StatusReady || m_clipStatus == StatusProxyOnly;
return m_clipStatus == FileStatus::StatusReady || m_clipStatus == FileStatus::StatusProxy || m_clipStatus == FileStatus::StatusProxyOnly;
}
AbstractProjectItem::CLIPSTATUS AbstractProjectItem::clipStatus() const
FileStatus::ClipStatus AbstractProjectItem::clipStatus() const
{
return m_clipStatus;
}
......
......@@ -146,10 +146,8 @@ public:
ClipHasAudioAndVideo
};
enum CLIPSTATUS { StatusReady = 0, StatusMissing, StatusWaiting, StatusDeleting, StatusProxyOnly };
virtual void setClipStatus(AbstractProjectItem::CLIPSTATUS status);
AbstractProjectItem::CLIPSTATUS clipStatus() const;
virtual void setClipStatus(FileStatus::ClipStatus status);
FileStatus::ClipStatus clipStatus() const;
bool statusReady() const;
/** @brief Returns the data that describes this item.
......@@ -221,7 +219,7 @@ protected:
uint m_usage;
uint m_rating;
QString m_tags;
CLIPSTATUS m_clipStatus;
FileStatus::ClipStatus m_clipStatus;
PROJECTITEMTYPE m_itemType;
......
......@@ -214,7 +214,7 @@ public:
painter->setFont(font);
if (type == AbstractProjectItem::ClipItem || type == AbstractProjectItem::SubClipItem) {
int decoWidth = 0;
AbstractProjectItem::CLIPSTATUS clipStatus = (AbstractProjectItem::CLIPSTATUS)index.data(AbstractProjectItem::ClipStatus).toInt();
FileStatus::ClipStatus clipStatus = (FileStatus::ClipStatus)index.data(AbstractProjectItem::ClipStatus).toInt();
if (opt.decorationSize.height() > 0) {
r.setWidth(r.height() * pCore->getCurrentDar());
QPixmap pix = opt.icon.pixmap(opt.icon.actualSize(r.size()));
......@@ -228,9 +228,9 @@ public:
}
// Draw frame in case of missing source
int cType = index.data(AbstractProjectItem::ClipType).toInt();
if (clipStatus == AbstractProjectItem::StatusMissing || clipStatus == AbstractProjectItem::StatusProxyOnly) {
if (clipStatus == FileStatus::StatusMissing || clipStatus == FileStatus::StatusProxyOnly) {
painter->save();
painter->setPen(QPen(clipStatus == AbstractProjectItem::StatusProxyOnly ? Qt::yellow : Qt::red, 3));
painter->setPen(QPen(clipStatus == FileStatus::StatusProxyOnly ? Qt::yellow : Qt::red, 3));
painter->drawRect(m_thumbRect.adjusted(0, 0, -1, -1));
painter->restore();
} else if (cType == ClipType::Image || cType == ClipType::SlideShow) {
......@@ -467,10 +467,10 @@ public:
//m_videoDragRect = QRect();
}
// Draw frame in case of missing source
AbstractProjectItem::CLIPSTATUS clipStatus = (AbstractProjectItem::CLIPSTATUS)index.data(AbstractProjectItem::ClipStatus).toInt();
if (clipStatus == AbstractProjectItem::StatusMissing || clipStatus == AbstractProjectItem::StatusProxyOnly) {
FileStatus::ClipStatus clipStatus = (FileStatus::ClipStatus)index.data(AbstractProjectItem::ClipStatus).toInt();
if (clipStatus == FileStatus::StatusMissing || clipStatus == FileStatus::StatusProxyOnly) {
painter->save();
painter->setPen(QPen(clipStatus == AbstractProjectItem::StatusProxyOnly ? Qt::yellow : Qt::red, 3));
painter->setPen(QPen(clipStatus == FileStatus::StatusProxyOnly ? Qt::yellow : Qt::red, 3));
painter->drawRect(m_thumbRect);
painter->restore();
} else if (cType == ClipType::Image || cType == ClipType::SlideShow) {
......@@ -1297,12 +1297,12 @@ bool Bin::eventFilter(QObject *obj, QEvent *event)
std::shared_ptr<AbstractProjectItem> item = m_itemModel->getBinItemByIndex(m_proxyModel->mapToSource(idx));
if (item->itemType() == AbstractProjectItem::ClipItem) {
auto clip = std::static_pointer_cast<ProjectClip>(item);
if (clip && clip->isReady()) {
if (clip && clip->statusReady()) {
editMasterEffect(item);
}
} else if (item->itemType() == AbstractProjectItem::SubClipItem) {
auto clip = std::static_pointer_cast<ProjectSubClip>(item)->getMasterClip();
if (clip && clip->isReady()) {
if (clip && clip->statusReady()) {
editMasterEffect(item);
}
}
......@@ -1483,10 +1483,14 @@ void Bin::slotReloadClip()
}
if (currentItem) {
emit openClip(std::shared_ptr<ProjectClip>());
if (currentItem->clipStatus() == AbstractProjectItem::StatusMissing || currentItem->clipStatus() == AbstractProjectItem::StatusProxyOnly) {
if (currentItem->clipStatus() == FileStatus::StatusMissing || currentItem->clipStatus() == FileStatus::StatusProxyOnly) {
// Don't attempt to reload missing clip
emit displayBinMessage(i18n("Missing source clip"), KMessageWidget::Warning);
return;
// Check if source file is available
const QString sourceUrl = currentItem->url();
if (!QFile::exists(sourceUrl)) {
emit displayBinMessage(i18n("Missing source clip"), KMessageWidget::Warning);
return;
}
}
if (currentItem->clipType() == ClipType::Playlist) {
// Check if a clip inside playlist is missing
......@@ -2476,7 +2480,7 @@ void Bin::setupAddClipAction(QMenu *addClipMenu, ClipType::ProducerType type, co
void Bin::showClipProperties(const std::shared_ptr<ProjectClip> &clip, bool forceRefresh)
{
if ((clip == nullptr) || !clip->isReady()) {
if ((clip == nullptr) || !clip->statusReady()) {
for (QWidget *w : m_propertiesPanel->findChildren<ClipPropertiesController *>()) {
delete w;
}
......@@ -2602,7 +2606,7 @@ void Bin::setWaitingStatus(const QString &id)
{
std::shared_ptr<ProjectClip> clip = m_itemModel->getClipByBinID(id);
if (clip) {
clip->setClipStatus(AbstractProjectItem::StatusWaiting);
clip->setClipStatus(FileStatus::StatusWaiting);
}
}
......@@ -3950,7 +3954,7 @@ void Bin::reloadAllProducers(bool reloadThumbs)
clip->resetProducerProperty(QStringLiteral("length"));
}
if (!xml.isNull()) {
clip->setClipStatus(AbstractProjectItem::StatusWaiting);
clip->setClipStatus(FileStatus::StatusWaiting);
pCore->jobManager()->slotDiscardClipJobs(clip->clipId());
clip->discardAudioThumb();
// We need to set a temporary id before all outdated producers are replaced;
......@@ -4059,7 +4063,7 @@ void Bin::setCurrent(const std::shared_ptr<AbstractProjectItem> &item)
switch (item->itemType()) {
case AbstractProjectItem::ClipItem: {
std::shared_ptr<ProjectClip> clp = std::static_pointer_cast<ProjectClip>(item);
if (clp && clp->isReady()) {
if (clp && clp->statusReady()) {
openProducer(clp);
emit requestShowEffectStack(clp->clipName(), clp->m_effectStack, clp->getFrameSize(), false);
}
......@@ -4069,7 +4073,7 @@ void Bin::setCurrent(const std::shared_ptr<AbstractProjectItem> &item)
auto subClip = std::static_pointer_cast<ProjectSubClip>(item);
QPoint zone = subClip->zone();
std::shared_ptr<ProjectClip> master = subClip->getMasterClip();
if (master && master->isReady()) {
if (master && master->statusReady()) {
openProducer(master, zone.x(), zone.y());
}
break;
......
......@@ -84,11 +84,13 @@ ProjectClip::ProjectClip(const QString &id, const QIcon &thumb, const std::share
{
m_markerModel = std::make_shared<MarkerListModel>(id, pCore->projectManager()->undoStack());
if (producer->get_int("_placeholder") == 1) {
m_clipStatus = StatusMissing;
m_clipStatus = FileStatus::StatusMissing;
} else if (producer->get_int("_missingsource") == 1) {
m_clipStatus = StatusProxyOnly;
m_clipStatus = FileStatus::StatusProxyOnly;
} else if (m_usesProxy) {
m_clipStatus = FileStatus::StatusProxy;
} else {
m_clipStatus = StatusReady;
m_clipStatus = FileStatus::StatusReady;
}
m_name = clipName();
m_duration = getStringDuration();
......@@ -135,7 +137,7 @@ ProjectClip::ProjectClip(const QString &id, const QDomElement &description, cons
: AbstractProjectItem(AbstractProjectItem::ClipItem, id, model)
, ClipController(id)
{
m_clipStatus = StatusWaiting;
m_clipStatus = FileStatus::StatusWaiting;
m_thumbnail = thumb;
m_markerModel = std::make_shared<MarkerListModel>(m_binId, pCore->projectManager()->undoStack());
if (description.hasAttribute(QStringLiteral("type"))) {
......@@ -478,6 +480,7 @@ bool ProjectClip::setProducer(std::shared_ptr<Mlt::Producer> producer, bool repl
Q_UNUSED(replaceProducer)
qDebug() << "################### ProjectClip::setproducer";
QMutexLocker locker(&m_producerMutex);
FileStatus::ClipStatus currentStatus = m_clipStatus;
updateProducer(producer);
m_thumbsProducer.reset();
connectEffectStack();
......@@ -498,7 +501,10 @@ bool ProjectClip::setProducer(std::shared_ptr<Mlt::Producer> producer, bool repl
}
}
m_duration = getStringDuration();
m_clipStatus = StatusReady;
m_clipStatus = m_usesProxy ? FileStatus::StatusProxy : FileStatus::StatusReady;
if (m_clipStatus != currentStatus) {
updateTimelineClips({TimelineModel::StatusRole});
}
setTags(getProducerProperty(QStringLiteral("kdenlive:tags")));
AbstractProjectItem::setRating((uint) getProducerIntProperty(QStringLiteral("kdenlive:rating")));
if (auto ptr = m_model.lock()) {
......@@ -951,11 +957,6 @@ std::unique_ptr<Mlt::Producer> ProjectClip::getClone()
return clone;
}
bool ProjectClip::isReady() const
{
return m_clipStatus == StatusReady || m_clipStatus == StatusProxyOnly;
}
QPoint ProjectClip::zone() const
{
return ClipController::zone();
......@@ -1327,10 +1328,10 @@ QVariant ProjectClip::getData(DataType type) const
{
switch (type) {
case AbstractProjectItem::IconOverlay:
if (m_clipStatus == AbstractProjectItem::StatusMissing) {
if (m_clipStatus == FileStatus::StatusMissing) {
return QVariant("window-close");
}
if (m_clipStatus == AbstractProjectItem::StatusWaiting) {
if (m_clipStatus == FileStatus::StatusWaiting) {
return QVariant("view-refresh");
}
return m_effectStack && m_effectStack->rowCount() > 0 ? QVariant("kdenlive-track_has_effect") : QVariant();
......@@ -1675,9 +1676,10 @@ const QVector <uint8_t> ProjectClip::audioFrameCache(int stream)
return audioLevels;
}
void ProjectClip::setClipStatus(AbstractProjectItem::CLIPSTATUS status)
void ProjectClip::setClipStatus(FileStatus::ClipStatus status)
{
AbstractProjectItem::setClipStatus(status);
updateTimelineClips({TimelineModel::StatusRole});
if (auto ptr = m_model.lock()) {
std::static_pointer_cast<ProjectItemModel>(ptr)->onItemUpdated(std::static_pointer_cast<ProjectClip>(shared_from_this()),
AbstractProjectItem::IconOverlay);
......
......@@ -146,9 +146,6 @@ public:
* . */
bool setProducer(std::shared_ptr<Mlt::Producer> producer, bool replaceProducer);
/** @brief Returns true if this clip already has a producer. */
bool isReady() const;
/** @brief Returns this clip's producer. */
std::shared_ptr<Mlt::Producer> thumbProducer() override;
......@@ -231,7 +228,7 @@ public:
/** @brief Return FFmpeg's audio stream index for an MLT audio stream index
*/
int getAudioStreamFfmpegIndex(int mltStream);
void setClipStatus(AbstractProjectItem::CLIPSTATUS status) override;
void setClipStatus(FileStatus::ClipStatus status) override;
/** @brief Rename an audio stream for this clip
*/
void renameAudioStream(int id, QString name) override;
......
......@@ -33,7 +33,7 @@ ProjectFolder::ProjectFolder(const QString &id, const QString &name, const std::
: AbstractProjectItem(AbstractProjectItem::FolderItem, id, model)
{
m_name = name;
m_clipStatus = StatusReady;
m_clipStatus = FileStatus::StatusReady;
m_thumbnail = QIcon::fromTheme(QStringLiteral("folder"));
}
......@@ -98,7 +98,7 @@ QString ProjectFolder::childByHash(const QString &hash)
}
}
for (auto &clip : allChildren) {
if (clip->isReady() && clip->hash() == hash) {
if (clip->statusReady() && clip->hash() == hash) {
return clip->clipId();
}
}
......
......@@ -742,7 +742,7 @@ bool ProjectItemModel::requestAddBinClip(QString &id, const std::shared_ptr<Mlt:
bool res = addItem(new_clip, parentId, undo, redo);
if (res) {
new_clip->importEffects(producer);
if (new_clip->isReady() || new_clip->sourceExists()) {
if (new_clip->statusReady() || new_clip->sourceExists()) {
int blocking = pCore->jobManager()->getBlockingJobId(id, AbstractClipJob::LOADJOB);
emit pCore->jobManager()->startJob<ThumbJob>({id}, blocking, QString(), -1, true);
if (KdenliveSettings::audiothumbnails()) {
......@@ -1082,7 +1082,7 @@ void ProjectItemModel::setClipWaiting(const QString &binId)
QWriteLocker locker(&m_lock);
std::shared_ptr<ProjectClip> clip = getClipByBinID(binId);
if (clip) {
clip->setClipStatus(AbstractProjectItem::StatusWaiting);
clip->setClipStatus(FileStatus::StatusWaiting);
}
}
......@@ -1091,7 +1091,7 @@ void ProjectItemModel::setClipInvalid(const QString &binId)
QWriteLocker locker(&m_lock);
std::shared_ptr<ProjectClip> clip = getClipByBinID(binId);
if (clip) {
clip->setClipStatus(AbstractProjectItem::StatusMissing);
clip->setClipStatus(FileStatus::StatusMissing);
// TODO: set producer as blank invalid
}
}
......@@ -1104,7 +1104,7 @@ void ProjectItemModel::updateWatcher(const std::shared_ptr<ProjectClip> &clipIte
m_fileWatcher->removeFile(clipItem->clipId());
QFileInfo check_file(clipItem->clipUrl());
// check if file exists and if yes: Is it really a file and no directory?
if ((check_file.exists() && check_file.isFile()) || clipItem->clipStatus() == AbstractProjectItem::StatusMissing) {
if ((check_file.exists() && check_file.isFile()) || clipItem->clipStatus() == FileStatus::StatusMissing) {
m_fileWatcher->addFile(clipItem->clipId(), clipItem->clipUrl());
}
}
......
......@@ -58,7 +58,7 @@ ProjectSubClip::ProjectSubClip(const QString &id, const std::shared_ptr<ProjectC
m_rating = zoneProperties.value(QLatin1String("rating")).toUInt();
m_tags = zoneProperties.value(QLatin1String("tags"));
qDebug()<<"=== LOADING SUBCLIP WITH RATING: "<<m_rating<<", TAGS: "<<m_tags;
m_clipStatus = StatusReady;
m_clipStatus = FileStatus::StatusReady;
// Save subclip in MLT
connect(parent.get(), &ProjectClip::thumbReady, this, &ProjectSubClip::gotThumb);
}
......
......@@ -82,6 +82,12 @@ enum ClipState { VideoOnly = 1, AudioOnly = 2, Disabled = 3 };
Q_ENUM_NS(ClipState)
} // namespace PlaylistState
namespace FileStatus {
Q_NAMESPACE
enum ClipStatus { StatusReady = 0, StatusProxy, StatusMissing, StatusWaiting, StatusDeleting, StatusProxyOnly };
Q_ENUM_NS(ClipStatus)
} // namespace PlaylistState
// returns a pair corresponding to (video, audio)
std::pair<bool, bool> stateToBool(PlaylistState::ClipState state);
PlaylistState::ClipState stateFromBool(std::pair<bool, bool> av);
......
......@@ -1194,7 +1194,7 @@ void KdenliveDoc::slotProxyCurrentItem(bool doProxy, QList<std::shared_ptr<Proje
// Only allow proxy on some clip types
if ((t == ClipType::Video || t == ClipType::AV || t == ClipType::Unknown || t == ClipType::Image || t == ClipType::Playlist ||
t == ClipType::SlideShow) &&
item->isReady()) {
item->statusReady()) {
if ((doProxy && !force && item->hasProxy()) ||
(!doProxy && !item->hasProxy() && pCore->projectItemModel()->hasClip(item->AbstractProjectItem::clipId()))) {
continue;
......
......@@ -296,7 +296,7 @@ void JobManager::slotManageFinishedJob(int id)
std::shared_ptr<AbstractProjectItem> item = pCore->projectItemModel()->getItemByBinId(it.first);
if (item && item->itemType() == AbstractProjectItem::ClipItem) {
auto clipItem = std::static_pointer_cast<ProjectClip>(item);
if (!clipItem->isReady()) {
if (!clipItem->statusReady()) {
// We were trying to load a new clip, delete it
pCore->projectItemModel()->requestBinClipDeletion(item, undo, redo);
}
......
......@@ -230,6 +230,11 @@ int main(int argc, char *argv[])
1, 0, // major and minor version of the import
"ClipState", // name in QML
"Error: only enums");
qmlRegisterUncreatableMetaObject(FileStatus::staticMetaObject, // static meta object
"com.enums", // import statement
1, 0, // major and minor version of the import
"ClipStatus", // name in QML
"Error: only enums");
qmlRegisterUncreatableMetaObject(ClipType::staticMetaObject, // static meta object
"com.enums", // import statement
1, 0, // major and minor version of the import
......
......@@ -1559,7 +1559,7 @@ void Monitor::slotOpenClip(const std::shared_ptr<ProjectClip> &controller, int i
// we are in record mode, don't display clip
return;
}
if (m_controller->isReady()) {
if (m_controller->statusReady()) {
m_timePos->setRange(0, (int)m_controller->frameDuration() - 1);
m_glMonitor->setRulerInfo((int)m_controller->frameDuration() - 1, controller->getMarkerModel());
loadQmlScene(MonitorSceneDefault);
......
......@@ -910,13 +910,13 @@ int ClipModel::getMaxDuration() const
return m_producer->get_length();
}
const QString ClipModel::clipName()
const QString ClipModel::clipName() const
{
return pCore->projectItemModel()->getClipByBinID(m_binClipId)->clipName();
}
bool ClipModel::isProxied() const
FileStatus::ClipStatus ClipModel::clipStatus() const
{
std::shared_ptr<ProjectClip> binClip = pCore->projectItemModel()->getClipByBinID(m_binClipId);
return binClip->hasProxy();
return binClip->clipStatus();
}
......@@ -74,7 +74,7 @@ public:
double getDoubleProperty(const QString &name) const;
/** @brief returns the bin clip name
*/
const QString clipName();
const QString clipName() const;
QSize getFrameSize() const;
Q_INVOKABLE bool showKeyframes() const;
Q_INVOKABLE void setShowKeyframes(bool show);
......@@ -213,8 +213,8 @@ protected:
/** @brief Returns the producer's duration, or -1 if it can be resized without limit */
int getMaxDuration() const;
/** @brief Returns true if the parent Bin Clip uses a proxy */
bool isProxied() const;
/** @brief Returns the clip status (normal, proxied, missing, etc) */
FileStatus::ClipStatus clipStatus() const;
/*@brief This is a debug function to ensure the clip is in a valid state */
bool checkConsistency();
......
......@@ -190,7 +190,6 @@ QHash<int, QByteArray> TimelineItemModel::roleNames() const
QHash<int, QByteArray> roles;
roles[NameRole] = "name";
roles[ResourceRole] = "resource";
roles[IsProxyRole] = "isProxy";
roles[ServiceRole] = "mlt_service";
roles[BinIdRole] = "binId";
roles[TrackIdRole] = "trackId";
......@@ -202,6 +201,7 @@ QHash<int, QByteArray> TimelineItemModel::roleNames() const
roles[MarkersRole] = "markers";
roles[KeyframesRole] = "keyframeModel";
roles[ShowKeyframesRole] = "showKeyframes";
roles[PlaylistStateRole] = "clipState";
roles[StatusRole] = "clipStatus";
roles[TypeRole] = "clipType";
roles[InPointRole] = "in";
......@@ -273,8 +273,8 @@ QVariant TimelineItemModel::data(const QModelIndex &index, int role) const
}
return result;
}
case IsProxyRole: {
return clip->isProxied();
case StatusRole: {
return clip->clipStatus();
}
case FakeTrackIdRole:
return clip->getFakeTrackId();
......@@ -309,7 +309,7 @@ QVariant TimelineItemModel::data(const QModelIndex &index, int role) const
case KeyframesRole: {
return QVariant::fromValue<KeyframeModel *>(clip->getKeyframeModel());
}
case StatusRole:
case PlaylistStateRole:
return QVariant::fromValue(clip->clipState());
case TypeRole:
return QVariant::fromValue(clip->clipType());
......
......@@ -987,8 +987,8 @@ bool TimelineModel::requestClipCreation(const QString &binClipId, int &id, Playl
return false;
}
std::shared_ptr<ProjectClip> master = pCore->projectItemModel()->getClipByBinID(bid);
if (!master->isReady() || !master->isCompatible(state)) {
qDebug() << "// CLIP NOT READY OR NOT COMPATIBLE: " << state<<" - - READY: "<<master->isReady();
if (!master->statusReady() || !master->isCompatible(state)) {
qDebug() << "// CLIP NOT READY OR NOT COMPATIBLE: " << state<<" - - READY: "<<master->statusReady();
return false;
}
int clipId = TimelineModel::getNextId();
......
......@@ -122,6 +122,7 @@ public:
FakeTrackIdRole,
FakePositionRole,
MarkersRole, /// clip only
PlaylistStateRole, /// clip only
StatusRole, /// clip only
TypeRole, /// clip only
KeyframesRole,
......
......@@ -31,7 +31,6 @@ Rectangle {
property string clipResource: ''
property string mltService: ''
property string effectNames
property bool isProxy: false
property int modelStart
property real scrollX: 0
property int inPoint: 0
......@@ -48,6 +47,7 @@ Rectangle {
property bool grouped: false
property var markers
property var keyframeModel
property int clipState: 0
property int clipStatus: 0
property int itemType: 0
property int fadeIn: 0
......@@ -186,7 +186,7 @@ Rectangle {
labelRect.x = scrollX > modelStart * timeScale ? scrollX - modelStart * timeScale : clipRoot.border.width
}
border.color: selected ? root.selectionColor : grouped ? root.groupColor : borderColor
border.color: (clipStatus == ClipStatus.StatusMissing || ClipStatus == ClipStatus.StatusWaiting || clipStatus == ClipStatus.StatusDeleting) ? "#ff0000" : selected ? root.selectionColor : grouped ? root.groupColor : borderColor
border.width: isGrabbed ? 8 : 2
function updateDrag() {
......@@ -195,7 +195,7 @@ Rectangle {
}
function getColor() {
if (clipStatus == ClipState.Disabled) {
if (clipState == ClipState.Disabled) {
return 'grey'
}
if (itemType == ProducerType.Text) {
......@@ -692,7 +692,7 @@ Rectangle {
x: labelRect.x
anchors.top: labelRect.top
anchors.left: labelRect.right
visible: clipRoot.isProxy && !clipRoot.isAudio
visible: !clipRoot.isAudio && clipRoot.clipStatus == ClipStatus.StatusProxy
Text {
// Proxy P
id: proxyLabel
......
......@@ -6,7 +6,7 @@ import com.enums 1.0
Row {
id: waveform
opacity: clipStatus == ClipState.Disabled ? 0.2 : 1
opacity: clipState == ClipState.Disabled ? 0.2 : 1
property int maxWidth: 500 + 100 * timeline.scaleFactor
anchors.fill: parent
......
......@@ -8,7 +8,7 @@ Row {
id: thumbRow
anchors.fill: parent
visible: !isAudio
opacity: clipStatus == ClipState.Disabled ? 0.2 : 1
opacity: clipState == ClipState.Disabled ? 0.2 : 1
property bool fixedThumbs: clipRoot.itemType == ProducerType.Image || clipRoot.itemType == ProducerType.Text || clipRoot.itemType == ProducerType.TextTemplate
property int thumbWidth: container.height * root.dar
property bool enableCache: clipRoot.itemType == ProducerType.Video || clipRoot.itemType == ProducerType.AV
......
......@@ -112,8 +112,8 @@ Item{
}
Binding {
target: loader.item
property: "clipStatus"
value: model.clipStatus
property: "clipState"
value: model.clipState
when: loader.status == Loader.Ready && isClip(model.clipType)
}
Binding {
......@@ -190,8 +190,8 @@ Item{
}
Binding {
target: loader.item
property: "isProxy"
value: model.isProxy
property: "clipStatus"
value: model.clipStatus
when: loader.status == Loader.Ready && isClip(model.clipType)
}
Binding {
......
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