Commit 7ea475b8 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Remove track "preview" compositing that is deprecated

and breaks with preview scaling.
Related to #825
parent 498173e4
......@@ -1107,20 +1107,12 @@ void MainWindow::setupActions()
hqComposite->setData(2);
m_compositeAction->addAction(hqComposite);
m_compositeAction->setCurrentAction(hqComposite);
} else {
QAction *previewComposite = new QAction(QIcon::fromTheme(QStringLiteral("composite-track-preview")), i18n("Preview"), this);
previewComposite->setCheckable(true);
previewComposite->setData(1);
m_compositeAction->addAction(previewComposite);
if (compose != QStringLiteral("composite")) {
QAction *hqComposite = new QAction(QIcon::fromTheme(QStringLiteral("composite-track-on")), i18n("High Quality"), this);
hqComposite->setData(2);
hqComposite->setCheckable(true);
m_compositeAction->addAction(hqComposite);
m_compositeAction->setCurrentAction(hqComposite);
} else {
m_compositeAction->setCurrentAction(previewComposite);
}
} else if (compose != QStringLiteral("composite")) {
QAction *hqComposite = new QAction(QIcon::fromTheme(QStringLiteral("composite-track-on")), i18n("High Quality"), this);
hqComposite->setData(2);
hqComposite->setCheckable(true);
m_compositeAction->addAction(hqComposite);
m_compositeAction->setCurrentAction(hqComposite);
}
connect(m_compositeAction, static_cast<void (KSelectAction::*)(QAction *)>(&KSelectAction::triggered), this, &MainWindow::slotUpdateCompositing);
addAction(QStringLiteral("timeline_compositing"), m_compositeAction);
......@@ -2166,9 +2158,7 @@ void MainWindow::slotRenderProject()
m_renderWidget->setRenderProfile(project->getRenderProperties());
}
if ( m_renderWidget && m_compositeAction && m_compositeAction->currentAction() ) {
m_renderWidget->errorMessage(RenderWidget::CompositeError, m_compositeAction->currentAction()->data().toInt() == 1
? i18n("Rendering using low quality track compositing")
: QString());
m_renderWidget->errorMessage(RenderWidget::CompositeError, QString());
}
slotCheckRenderStatus();
......
......@@ -965,6 +965,10 @@ bool ProjectManager::updateTimeline(int pos, int scrollPos)
const QString groupsData = m_project->getDocumentProperty(QStringLiteral("groups"));
// update track compositing
int compositing = pCore->currentDoc()->getDocumentProperty(QStringLiteral("compositing"), QStringLiteral("2")).toInt();
if (compositing == 1) {
// Composite transition is deprecated, switch to hq by default
compositing = 2;
}
emit pCore->currentDoc()->updateCompositionMode(compositing);
if (compositing < 2) {
pCore->window()->getMainTimeline()->controller()->switchCompositing(compositing);
......
......@@ -2289,9 +2289,6 @@ void TimelineController::switchCompositing(int mode)
}
}
if (mode > 0) {
const QString compositeGeometry =
QStringLiteral("0 0 %1 %2").arg(m_model->m_tractor->profile()->width()).arg(m_model->m_tractor->profile()->height());
// Loop through tracks
for (int track = 0; track < m_model->getTracksCount(); track++) {
if (m_model->getTrackById(m_model->getTrackIndexFromPosition(track))->getProperty("kdenlive:audio_track").toInt() == 0) {
......@@ -2300,13 +2297,6 @@ void TimelineController::switchCompositing(int mode)
mode == 1 ? "composite" : TransitionsRepository::get()->getCompositingTransition().toUtf8().constData());
t.set("always_active", 1);
t.set_tracks(0, track + 1);
if (mode == 1) {
t.set("valign", "middle");
t.set("halign", "centre");
t.set("fill", 1);
t.set("aligned", 0);
t.set("geometry", compositeGeometry.toUtf8().constData());
}
t.set("internal_added", 237);
field->plant_transition(t, 0, track + 1);
}
......
......@@ -21,7 +21,7 @@ void checkMarkerList(const std::shared_ptr<MarkerListModel> &model, const std::v
for (int i = 0; i < model->rowCount(); ++i) {
Marker m;
// Model markers and List do not necessarily use the same order
for (int j = 0; j < list.size(); j++) {
for (size_t j = 0; j < list.size(); j++) {
if (qAbs(std::get<0>(list[j]).seconds() - model->data(model->index(i), MarkerListModel::PosRole).toDouble()) < 0.9 / fps) {
m = list[j];
list.erase(std::remove(list.begin(), list.end(), m), list.end());
......
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