mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-08 03:42:09 +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(
|
std::unique_ptr<FileOp> fop(
|
||||||
FileOp::createLoadDocumentOperation(context, m_paths.front(), flags));
|
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)
|
// Do nothing (the user cancelled or something like that)
|
||||||
if (!fop)
|
if (!fop)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (fop->hasError()) {
|
||||||
|
console.printf(fop->error().c_str());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
base::paths fopFilenames;
|
base::paths fopFilenames;
|
||||||
fop->getFilenameList(fopFilenames);
|
fop->getFilenameList(fopFilenames);
|
||||||
// Remove paths that will be loaded by the current file operation.
|
// Remove paths that will be loaded by the current file operation.
|
||||||
@ -125,11 +132,6 @@ bool DropOnTimeline::getNextDocFromPaths(Doc** srcDoc)
|
|||||||
m_paths.erase(it);
|
m_paths.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fop->hasError()) {
|
|
||||||
console.printf(fop->error().c_str());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
OpenFileJob task(fop.get(), true);
|
OpenFileJob task(fop.get(), true);
|
||||||
task.showProgressWindow();
|
task.showProgressWindow();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user