mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 15:54:41 +00:00
Merge pull request #4828 from martincapello/fix-dropping-unsupported-files
This commit is contained in:
commit
0d2f5a1a9e
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user