diff --git a/aegisub/src/subtitle_format.cpp b/aegisub/src/subtitle_format.cpp index d5f6f9fc2..35be78db3 100644 --- a/aegisub/src/subtitle_format.cpp +++ b/aegisub/src/subtitle_format.cpp @@ -140,9 +140,10 @@ agi::vfr::Framerate SubtitleFormat::AskForFPS(bool allow_vfr, bool show_smpte) { choices.Add(_("119.880 FPS (NTSC x4)")); choices.Add(_("120.000 FPS")); - wxEndBusyCursor(); + bool was_busy = wxIsBusy(); + if (was_busy) wxEndBusyCursor(); int choice = wxGetSingleChoiceIndex(_("Please choose the appropriate FPS for the subtitles:"), _("FPS"), choices); - wxBeginBusyCursor(); + if (was_busy) wxBeginBusyCursor(); using agi::vfr::Framerate; if (choice == -1) diff --git a/aegisub/src/subtitle_format_microdvd.cpp b/aegisub/src/subtitle_format_microdvd.cpp index 3733874d7..588eb8e05 100644 --- a/aegisub/src/subtitle_format_microdvd.cpp +++ b/aegisub/src/subtitle_format_microdvd.cpp @@ -94,7 +94,7 @@ void MicroDVDSubtitleFormat::ReadFile(AssFile *target, agi::fs::path const& file std::string line = file.ReadLineFromFile(); if (!regex_match(line, match, line_regex)) continue; - std::string text = match[2].str(); + std::string text = match[3].str(); // If it's the first, check if it contains fps information if (isFirst) { @@ -111,8 +111,8 @@ void MicroDVDSubtitleFormat::ReadFile(AssFile *target, agi::fs::path const& file if (!fps.IsLoaded()) return; } - int f1 = boost::lexical_cast(match[0]); - int f2 = boost::lexical_cast(match[1]); + int f1 = boost::lexical_cast(match[1]); + int f2 = boost::lexical_cast(match[2]); boost::replace_all(text, "|", "\\N");