From changelog:

- Drag-and-drop files onto the program no longer causes the subs to be unloaded every time, even if no subs were dropped (jfs)
- Recombining lines (1,1+2 and 1+2,2) where the lone line is a substring of the line only appearing combined no longer causes incorrect results (as a side-effect, more strict prefix/suffix-checking has also been implemented) (jfs)

Originally committed to SVN as r54.
This commit is contained in:
Niels Martin Hansen 2006-02-01 02:16:57 +00:00
parent 2d3d317278
commit defaf3a5ac
4 changed files with 50 additions and 30 deletions

View File

@ -17,6 +17,8 @@ Please visit http://aegisub.net to download latest version
o When editing karaoke-timing for a line and not splitting/joining, all tags are kept intact, so only the \k tag timings are changed
- Fixed bug where \t tags (among others?) would lose their parameters when being rebuilt (happens with Framerate Transport export filter, Automation and during the karaoke timing improvements listed above, among other places) (jfs)
- Implemented FexTracker, for automatically tracking positions on the video and placing text accordingly (Tentacle)
- Drag-and-drop files onto the program no longer causes the subs to be unloaded every time, even if no subs were dropped (jfs)
- Recombining lines (1,1+2 and 1+2,2) where the lone line is a substring of the line only appearing combined no longer causes incorrect results (as a side-effect, more strict prefix/suffix-checking has also been implemented) (jfs)
= 1.09 beta - 2006.01.16 ===========================

View File

@ -1088,7 +1088,9 @@ bool FrameMain::LoadList(wxArrayString list) {
blockVideoLoad = (video != _T(""));
// Load files
LoadSubtitles(subs);
if (subs != _T("")) {
LoadSubtitles(subs);
}
if (blockVideoLoad) {
blockVideoLoad = false;
LoadVideo(video);

View File

@ -207,7 +207,6 @@ private:
bool SaveSubtitles(bool saveas=false,bool withCharset=false);
int TryToCloseSubs(bool enableCancel=true);
void SetDisplayMode(int mode);
void StatusTimeout(wxString text,int ms=10000);
void AppendBitmapMenuItem (wxMenu* parentMenu,int id,wxString text,wxString help,wxBitmap bmp);
wxMenuItem *RebuildMenuItem(wxMenu *menu,int id,wxBitmap bmp1,wxBitmap bmp2,bool state);
@ -229,6 +228,7 @@ public:
static wxArrayString GetEncodings();
void UpdateTitle();
void SetSelectionFlag (bool HasSelection);
void StatusTimeout(wxString text,int ms=10000);
void SetAccelerators();
void InitMenu();

View File

@ -823,21 +823,29 @@ void SubtitlesGrid::On122Recombine(wxCommandEvent &event) {
AssDialogue *n1,*n2;
n1 = GetDialogue(n);
n2 = GetDialogue(n+1);
n1->Text.Replace(n2->Text,_T(""));
n1->Text.Trim(true);
n1->Text.Trim(false);
if (n1->Text.Left(2) == _T("\\N") || n1->Text.Left(2) == _T("\\n")) n1->Text = n1->Text.Mid(2);
if (n1->Text.Right(2) == _T("\\N") || n1->Text.Right(2) == _T("\\n")) n1->Text = n1->Text.Mid(0,n1->Text.Length()-2);
n2->Start = n1->Start;
n1->ParseASSTags();
n1->UpdateData();
n2->UpdateData();
n1->Text.Trim(true).Trim(false);
n2->Text.Trim(true).Trim(false);
// Commit
SetRowToLine(n,n1);
SetRowToLine(n+1,n2);
ass->FlagAsModified();
CommitChanges();
// Check if n2 is a suffix of n1
if (n1->Text.Right(n2->Text.Length()) == n2->Text) {
n1->Text = n1->Text.SubString(0, n1->Text.Length() - n2->Text.Length() - 1).Trim(true).Trim(false);
while (n1->Text.Left(2) == _T("\\N") || n1->Text.Left(2) == _T("\\n"))
n1->Text = n1->Text.Mid(2);
while (n1->Text.Right(2) == _T("\\N") || n1->Text.Right(2) == _T("\\n"))
n1->Text = n1->Text.Mid(0,n1->Text.Length()-2);
n2->Start = n1->Start;
n1->ParseASSTags();
n1->UpdateData();
n2->UpdateData();
// Commit
SetRowToLine(n,n1);
SetRowToLine(n+1,n2);
ass->FlagAsModified();
CommitChanges();
} else {
parentFrame->StatusTimeout(_T("Unable to recombine: Second line is not a suffix of first one."));
}
}
@ -854,21 +862,29 @@ void SubtitlesGrid::On112Recombine(wxCommandEvent &event) {
AssDialogue *n1,*n2;
n1 = GetDialogue(n);
n2 = GetDialogue(n+1);
n2->Text.Replace(n1->Text,_T(""));
n2->Text.Trim(true);
n2->Text.Trim(false);
if (n2->Text.Left(2) == _T("\\N") || n2->Text.Left(2) == _T("\\n")) n2->Text = n2->Text.Mid(2);
if (n2->Text.Right(2) == _T("\\N") || n2->Text.Right(2) == _T("\\n")) n2->Text = n2->Text.Mid(0,n2->Text.Length()-2);
n1->End = n2->End;
n2->ParseASSTags();
n1->UpdateData();
n2->UpdateData();
n1->Text.Trim(true).Trim(false);
n2->Text.Trim(true).Trim(false);
// Commit
SetRowToLine(n,n1);
SetRowToLine(n+1,n2);
ass->FlagAsModified();
CommitChanges();
// Check if n1 is a prefix of n2 and recombine
if (n2->Text.Left(n1->Text.Length()) == n1->Text) {
n2->Text = n2->Text.Mid(n1->Text.Length()).Trim(true).Trim(false);
while (n2->Text.Left(2) == _T("\\N") || n2->Text.Left(2) == _T("\\n"))
n2->Text = n2->Text.Mid(2);
while (n2->Text.Right(2) == _T("\\N") || n2->Text.Right(2) == _T("\\n"))
n2->Text = n2->Text.Mid(0,n2->Text.Length()-2);
n1->End = n2->End;
n2->ParseASSTags();
n1->UpdateData();
n2->UpdateData();
// Commit
SetRowToLine(n,n1);
SetRowToLine(n+1,n2);
ass->FlagAsModified();
CommitChanges();
} else {
parentFrame->StatusTimeout(_T("Unable to recombine: First line is not a prefix of second one."));
}
}