|
|
@@ -326,7 +326,7 @@ private: |
|
|
|
auto oldFile = documentFile;
|
|
|
|
documentFile = newFile;
|
|
|
|
|
|
|
|
auto tidyUp = [parent, newFile, oldFile, showMessageOnFailure, showWaitCursor, completed]
|
|
|
|
auto tidyUp = [parent, newFile, oldFile, showMessageOnFailure, showWaitCursor, completed] (Result result)
|
|
|
|
{
|
|
|
|
if (parent.shouldExitAsyncCallback())
|
|
|
|
return;
|
|
|
@@ -336,8 +336,6 @@ private: |
|
|
|
if (showWaitCursor)
|
|
|
|
MouseCursor::hideWaitCursor();
|
|
|
|
|
|
|
|
auto result = Result::fail (TRANS ("The file doesn't exist"));
|
|
|
|
|
|
|
|
if (showMessageOnFailure)
|
|
|
|
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
|
|
|
|
TRANS ("Failed to open file..."),
|
|
|
@@ -373,7 +371,7 @@ private: |
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
tidyUp();
|
|
|
|
tidyUp (result);
|
|
|
|
};
|
|
|
|
|
|
|
|
doLoadDocument (newFile, std::move (afterLoading));
|
|
|
@@ -381,7 +379,7 @@ private: |
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
tidyUp();
|
|
|
|
tidyUp (Result::fail (TRANS ("The file doesn't exist")));
|
|
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|