Commit 976436dd authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Merge branch '2004'

parents 109d6c9c 34be1b01
Pipeline #16978 passed with stage
in 16 minutes and 10 seconds
......@@ -2739,8 +2739,8 @@ int TimelineModel::getNextSnapPos(int pos, std::vector<size_t> &snaps)
// sort snaps
std::sort(snaps.begin(), snaps.end());
for (auto i : snaps) {
if (i > pos) {
return i;
if ((int)i > pos) {
return (int) i;
}
}
return pos;
......@@ -2774,8 +2774,8 @@ int TimelineModel::getPreviousSnapPos(int pos, std::vector<size_t> &snaps)
// sort descending
std::reverse(snaps.begin(),snaps.end());
for (auto i : snaps) {
if (i < pos) {
return i;
if ((int)i < pos) {
return (int)i;
}
}
return 0;
......
......@@ -686,8 +686,8 @@ void TimelineController::gotoNextSnap()
m_snapStackIndex = pCore->undoIndex();
m_activeSnaps.clear();
m_activeSnaps = pCore->projectManager()->current()->getGuideModel()->getSnapPoints();
m_activeSnaps.push_back(m_zone.x());
m_activeSnaps.push_back(m_zone.y() - 1);
m_activeSnaps.push_back((size_t)m_zone.x());
m_activeSnaps.push_back((size_t)(m_zone.y() - 1));
}
int nextSnap = m_model->getNextSnapPos(pCore->getTimelinePosition(), m_activeSnaps);
if (nextSnap > pCore->getTimelinePosition()) {
......@@ -702,8 +702,8 @@ void TimelineController::gotoPreviousSnap()
m_snapStackIndex = pCore->undoIndex();
m_activeSnaps.clear();
m_activeSnaps = pCore->projectManager()->current()->getGuideModel()->getSnapPoints();
m_activeSnaps.push_back(m_zone.x());
m_activeSnaps.push_back(m_zone.y() - 1);
m_activeSnaps.push_back((size_t)m_zone.x());
m_activeSnaps.push_back((size_t)(m_zone.y() - 1));
}
setPosition(m_model->getPreviousSnapPos(pCore->getTimelinePosition(), m_activeSnaps));
}
......
......@@ -26,6 +26,7 @@
#include "doc/kdenlivedoc.h"
#include "project/projectmanager.h"
#include <QStandardPaths>
#include <KMessageBox>
OtioConvertions::OtioConvertions()
......@@ -34,6 +35,11 @@ OtioConvertions::OtioConvertions()
void OtioConvertions::getOtioConverters()
{
if(QStandardPaths::findExecutable(QStringLiteral("otioconvert")).isEmpty() ||
QStandardPaths::findExecutable(QStringLiteral("python3")).isEmpty()) {
qInfo("otioconvert or python3 not available, project import/export not enabled");
return;
}
connect(&m_otioProcess, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &OtioConvertions::slotGotOtioConverters);
m_otioProcess.start(QStringLiteral("python3"));
m_otioProcess.write(QStringLiteral(
......
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