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

Fix loading progress not disappearing and incorrect "clip already exists" message

parent 43c287ff
......@@ -4829,19 +4829,19 @@ void Bin::requestTranscoding(const QString &url, const QString &id, bool checkPr
{
if (m_transcodingDialog == nullptr) {
m_transcodingDialog = new TranscodeSeek(this);
connect(m_transcodingDialog, &QDialog::accepted, this, [=] () {
connect(m_transcodingDialog, &QDialog::accepted, this, [&, checkProfile] () {
QString firstId = m_transcodingDialog->ids().front();
std::vector<QString> ids = m_transcodingDialog->ids();
for (const QString &id : ids) {
std::shared_ptr<ProjectClip> clip = m_itemModel->getClipByBinID(id);
TranscodeTask::start({ObjectType::BinClip,id.toInt()}, m_transcodingDialog->preParams(), m_transcodingDialog->params(), -1, -1, true, clip.get(), false, id == firstId ? checkProfile : false);
}
delete m_transcodingDialog;
m_transcodingDialog->deleteLater();
m_transcodingDialog = nullptr;
});
connect(m_transcodingDialog, &QDialog::rejected, this, [=] () {
connect(m_transcodingDialog, &QDialog::rejected, this, [&, checkProfile] () {
QString firstId = m_transcodingDialog->ids().front();
delete m_transcodingDialog;
m_transcodingDialog->deleteLater();
m_transcodingDialog = nullptr;
if (checkProfile) {
pCore->bin()->slotCheckProfile(firstId);
......
......@@ -219,7 +219,7 @@ const QString ClipCreator::createClipsFromList(const QList<QUrl> &list, bool che
QStringList duplicates;
bool firstClip = topLevel;
for (const QUrl &url : list) {
if (!pCore->projectItemModel()->urlExists(url.toLocalFile())) {
if (!pCore->projectItemModel()->urlExists(url.toLocalFile()) || QFileInfo(url.toLocalFile()).isDir()) {
cleanList << url;
} else {
duplicates << url.toLocalFile();
......@@ -367,7 +367,7 @@ const QString ClipCreator::createClipsFromList(const QList<QUrl> &list, bool che
}
qApp->processEvents();
}
pCore->displayMessage(QString(), OperationCompletedMessage);
pCore->displayMessage(i18n("Loading done"), OperationCompletedMessage, 100);
qDebug() << "/////////// creatclipsfromlist return" << created;
return createdItem == QLatin1String("-1") ? QString() : createdItem;
}
......
......@@ -150,7 +150,7 @@ void StatusBarMessageLabel::setMessage(const QString &text, MessageType type, in
m_queueSemaphore.acquire();
if (!m_messageQueue.contains(item)) {
if (item.type == ErrorMessage || item.type == MltError || item.type == ProcessingJobMessage || item.type == OperationCompletedMessage) {
if (item.type == ErrorMessage || item.type == MltError || item.type == ProcessingJobMessage) {
qCDebug(KDENLIVE_LOG) << item.text;
// Put the new error message at first place and immediately show it
......
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