diff --git a/aegisub/changelog.txt b/aegisub/changelog.txt index 54f04cc21..d65f8200a 100644 --- a/aegisub/changelog.txt +++ b/aegisub/changelog.txt @@ -12,6 +12,7 @@ Please visit http://aegisub.net to download latest version o It is now possible to write macros that manipulate subtitles directly o Scripts have full access to the entire subtitle file, not only the "Events" section o Scripts are automatically reloaded when the Export dialog is opened (this can be changed in Options) + - Ctrl or Ctrl+Shift click on the Automation toolbar button to reload autoload/all scripts - Video mode changes: o It has been mostly rewriten and now uses OpenGL instead of software rendering, making it much faster on computers with video cards that don't belong to the stone age. (AMZ) o Optionally, it can use a Pixel Shader to convert YV12 to RGB32 in hardware, which is much faster, with a decent video card. (AMZ) diff --git a/aegisub/frame_main_events.cpp b/aegisub/frame_main_events.cpp index 6fce263da..605dab42f 100644 --- a/aegisub/frame_main_events.cpp +++ b/aegisub/frame_main_events.cpp @@ -696,7 +696,7 @@ void FrameMain::OnExportSubtitles(wxCommandEvent & WXUNUSED(event)) { } } } - if (autoreload & 1) { + if (autoreload & 2) { // Global scripts wxGetApp().global_scripts->Reload(); } @@ -954,9 +954,33 @@ void FrameMain::OnOpenLog (wxCommandEvent &event) { /////////////////// // Open Automation void FrameMain::OnOpenAutomation (wxCommandEvent &event) { - VideoContext::Get()->Stop(); - DialogAutomation dlg(this, local_scripts); - dlg.ShowModal(); + if (wxGetMouseState().ControlDown()) { + wxGetApp().global_scripts->Reload(); + if (wxGetMouseState().ShiftDown()) { + const std::vector scripts = local_scripts->GetScripts(); + for (size_t i = 0; i < scripts.size(); ++i) { + try { + scripts[i]->Reload(); + } + catch (const wchar_t *e) { + wxLogError(e); + } + catch (...) { + wxLogError(_T("An unknown error occurred reloading Automation script '%s'."), scripts[i]->GetName().c_str()); + } + } + + StatusTimeout(_("Reloaded all Automation scripts")); + } + else { + StatusTimeout(_("Reloaded autoload Automation scripts")); + } + } + else { + VideoContext::Get()->Stop(); + DialogAutomation dlg(this, local_scripts); + dlg.ShowModal(); + } }