Attempting to load a file which does not exist no longer unloads previous subtitles. (Fix to bug #12)
Originally committed to SVN as r133.
This commit is contained in:
parent
7e1d5f4fa8
commit
81efd4082f
2 changed files with 9 additions and 0 deletions
|
@ -50,6 +50,7 @@ Please visit http://aegisub.net to download latest version
|
|||
- Added forums and bugtracker to Help menu. (AMZ)
|
||||
- Fixed Fonts Collector behavior with font shortcuts. (AMZ)
|
||||
- Better error reporting when loading Automation scripts (jfs)
|
||||
- Attempting to load a file which does not exist no longer unloads previous subtitles. (AMZ)
|
||||
|
||||
|
||||
= 1.09 beta - 2006.01.16 ===========================
|
||||
|
|
|
@ -485,6 +485,13 @@ void FrameMain::LoadSubtitles (wxString filename,wxString charset) {
|
|||
|
||||
// Load
|
||||
try {
|
||||
// File exists?
|
||||
if (isFile) {
|
||||
wxFileName fileCheck(filename);
|
||||
if (!fileCheck.FileExists()) throw _T("File does not exist.");
|
||||
}
|
||||
|
||||
// Proceed into loading
|
||||
SubsBox->Clear();
|
||||
AssFile::StackReset();
|
||||
if (isFile) {
|
||||
|
@ -501,6 +508,7 @@ void FrameMain::LoadSubtitles (wxString filename,wxString charset) {
|
|||
}
|
||||
catch (AutomationError &err) {
|
||||
wxMessageBox(wxString(_T("Automation exception: ")) + err.message, _T("Error"), wxOK | wxICON_ERROR, NULL);
|
||||
return;
|
||||
}
|
||||
catch (...) {
|
||||
wxMessageBox(_T("Unknown error"), _T("Error"), wxOK | wxICON_ERROR, NULL);
|
||||
|
|
Loading…
Reference in a new issue