From 4b8d7b4dc8452876c6243341745d273dd2bdb2ca Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Thu, 24 Aug 2006 00:38:49 +0000 Subject: [PATCH] Updated version.cpp to say 1.11. Hack to allow loading files with mixed V4 and V4+ style sections. Originally committed to SVN as r526. --- core/subtitle_format_ass.cpp | 16 ++++++++++++---- core/version.cpp | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/core/subtitle_format_ass.cpp b/core/subtitle_format_ass.cpp index 455f2dcfb..495c4fa16 100644 --- a/core/subtitle_format_ass.cpp +++ b/core/subtitle_format_ass.cpp @@ -67,13 +67,21 @@ void ASSSubtitleFormat::ReadFile(wxString filename,wxString encoding) { wxbuffer = file.ReadLineFromFile(); // Convert v4 styles to v4+ styles + // Ugly hacks to allow intermixed v4 and v4+ style sections if (wxbuffer.Lower() == _T("[v4 styles]")) { wxbuffer = _T("[V4+ Styles]"); - } - - // Set group - if (wxbuffer[0] == _T('[')) { curgroup = wxbuffer; + IsSSA = true; + } + else if (wxbuffer.Lower() == _T("[v4+ styles]")) { + curgroup = wxbuffer; + IsSSA = false; + } + // Not-so-special case for other groups, just set it + else if (wxbuffer[0] == _T('[')) { + curgroup = wxbuffer; + // default from extension in all other sections + IsSSA = filename.Right(4).Lower() == _T(".ssa"); } // Add line diff --git a/core/version.cpp b/core/version.cpp index 5789762f7..3482427dd 100644 --- a/core/version.cpp +++ b/core/version.cpp @@ -78,7 +78,7 @@ struct VersionInfoStruct { wxString SCMStr, VersionStr; // Update this whenever a new version is release - VersionNumber = _T("v1.10"); + VersionNumber = _T("v1.11"); #ifdef _DEBUG IsDebug = true; #else