Merge pull request #4828 from martincapello/fix-dropping-unsupported-files

This commit is contained in:
David Capello 2024-12-11 15:20:44 -03:00 committed by GitHub
commit 0d2f5a1a9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -111,11 +111,18 @@ bool DropOnTimeline::getNextDocFromPaths(Doc** srcDoc)
std::unique_ptr<FileOp> fop(
FileOp::createLoadDocumentOperation(context, m_paths.front(), flags));
// Remove the path that is currently being processed
m_paths.erase(m_paths.begin());
// Do nothing (the user cancelled or something like that)
if (!fop)
return false;
if (fop->hasError()) {
console.printf(fop->error().c_str());
return true;
}
base::paths fopFilenames;
fop->getFilenameList(fopFilenames);
// Remove paths that will be loaded by the current file operation.
@ -125,11 +132,6 @@ bool DropOnTimeline::getNextDocFromPaths(Doc** srcDoc)
m_paths.erase(it);
}
if (fop->hasError()) {
console.printf(fop->error().c_str());
return true;
}
OpenFileJob task(fop.get(), true);
task.showProgressWindow();