From 82236684e766d8c7a707d116e9c8ec79a40187f0 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sun, 19 Feb 2006 04:00:22 +0000 Subject: [PATCH] Fixed bug related to tag cycling, which would reset grid, move video and force a refresh of everything (slow, and could undo uncommited changes) Originally committed to SVN as r73. --- core/changelog.txt | 1 + core/frame_main_events.cpp | 43 ++++++++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/core/changelog.txt b/core/changelog.txt index 7ceb9ac59..bb7f02286 100644 --- a/core/changelog.txt +++ b/core/changelog.txt @@ -27,6 +27,7 @@ Please visit http://aegisub.net to download latest version - Default video zoom can now be set in config.dat and is defaulted to 100% (AMZ) - Fixed crash in Translation and Styling assistants, when you attempted to move past end of file, and then play (AMZ) - Fixed linked commit of times, so it will only commit both times if the other was changed (to prevent damage when editing multiple lines) (AMZ) +- Fixed bug related to tag cycling, which would reset grid, move video and force a refresh of everything (slow, and could undo uncommited changes) (AMZ) = 1.09 beta - 2006.01.16 =========================== diff --git a/core/frame_main_events.cpp b/core/frame_main_events.cpp index cd4812484..a21674709 100644 --- a/core/frame_main_events.cpp +++ b/core/frame_main_events.cpp @@ -996,23 +996,34 @@ void FrameMain::OnOpenStylingAssistant (wxCommandEvent &event) { // Auto backup void FrameMain::OnAutoSave(wxTimerEvent &event) { // Auto Save - if (AssFile::top->loaded && AssFile::top->IsASS) { - // Set path - wxFileName origfile(AssFile::top->filename); - wxString path = Options.AsText(_T("Auto save path")); - if (path == _T("")) path = origfile.GetPath(); - wxFileName dstpath(path); - if (!dstpath.IsAbsolute()) path = AegisubApp::folderName + path; - path += _T("/"); - dstpath.Assign(path); - if (!dstpath.DirExists()) wxMkdir(path); + try { + if (AssFile::top->loaded && AssFile::top->IsASS) { + // Set path + wxFileName origfile(AssFile::top->filename); + wxString path = Options.AsText(_T("Auto save path")); + if (path == _T("")) path = origfile.GetPath(); + wxFileName dstpath(path); + if (!dstpath.IsAbsolute()) path = AegisubApp::folderName + path; + path += _T("/"); + dstpath.Assign(path); + if (!dstpath.DirExists()) wxMkdir(path); - // Save - wxString backup = path + origfile.GetName() + _T(".AUTOSAVE.") + origfile.GetExt(); - AssFile::top->Save(backup,false,false); + // Save + wxString backup = path + origfile.GetName() + _T(".AUTOSAVE.") + origfile.GetExt(); + AssFile::top->Save(backup,false,false); - // Set status bar - StatusTimeout(_("File backup saved as \"") + backup + _T("\".")); + // Set status bar + StatusTimeout(_("File backup saved as \"") + backup + _T("\".")); + } + } + catch (wxString err) { + StatusTimeout(_T("Exception when attempting to autosave file: ") + err); + } + catch (wchar_t *err) { + StatusTimeout(_T("Exception when attempting to autosave file: ") + wxString(err)); + } + catch (...) { + StatusTimeout(_T("Unhandled exception when attempting to autosave file.")); } } @@ -1106,7 +1117,7 @@ void FrameMain::OnToggleTags(wxCommandEvent &event) { Options.Save(); // Refresh grid - SubsBox->LoadFromAss(NULL,true,true); + SubsBox->Refresh(false); }