Commit 43954201 authored by Julius Künzel's avatar Julius Künzel
Browse files

Improvements for field order option

parent b0562678
Pipeline #145935 passed with stage
in 7 minutes and 5 seconds
......@@ -40,7 +40,6 @@ ProfileModel::ProfileModel(const QString &path)
QString line = in.readLine();
if (line.contains(QStringLiteral("bottom_field_first"))) {
m_bottom_field_first = line.split(QStringLiteral("=")).at(1).toInt() == 1;
qDebug() << "FOUND" << "bottom_field_first value:" << m_bottom_field_first;
f.close();
}
}
......
......@@ -657,6 +657,7 @@ void ProjectManager::doOpenFile(const QUrl &url, KAutoSaveFile *stale)
}
pCore->window()->connectDocument();
pCore->mixer()->setModel(m_mainTimelineModel);
m_mainTimelineModel->updateFieldOrderFilter(pCore->getCurrentProfile());
emit docOpened(m_project);
pCore->displayMessage(QString(), OperationCompletedMessage, 100);
if (openBackup) {
......
......@@ -5694,10 +5694,15 @@ void TimelineModel::updateFieldOrderFilter(std::unique_ptr<ProfileModel> &ptr)
// If the profile is progressiv, field order is redundant: remove
// Also we only need one field order filter
m_tractor->detach(*fl.get());
pCore->currentDoc()->setModified(true);
} else {
foFilter = fl;
foFilter->set("internal_added", 237);
foFilter->set("av.order", ptr->bottom_field_first() ? "bff" : "tff");
QString value = ptr->bottom_field_first() ? "bff" : "tff";
if (foFilter->get("av.order") != value) {
pCore->currentDoc()->setModified(true);
}
foFilter->set("av.order", value.toUtf8().constData());
}
}
}
......@@ -5708,6 +5713,7 @@ void TimelineModel::updateFieldOrderFilter(std::unique_ptr<ProfileModel> &ptr)
foFilter->set("internal_added", 237);
foFilter->set("av.order", ptr->bottom_field_first() ? "bff" : "tff");
m_tractor->attach(*foFilter.get());
pCore->currentDoc()->setModified(true);
}
}
}
......
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