From ff081c0ae999cef7b2f2336b58679fa3cc0d66fe Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sun, 15 Jun 2008 13:18:28 +0000 Subject: [PATCH] Fix #701, make sure plain-text lines pasted from clipboard are always blank-timed, ie. start and end time are zero. Originally committed to SVN as r2202. --- aegisub/subs_grid.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aegisub/subs_grid.cpp b/aegisub/subs_grid.cpp index 56df1f233..05e870914 100644 --- a/aegisub/subs_grid.cpp +++ b/aegisub/subs_grid.cpp @@ -940,11 +940,17 @@ void SubtitlesGrid::PasteLines(int n,bool pasteOver) { curdata.Trim(false); AssDialogue *curdiag; try { + // Try to interpret the line as an ASS line curdiag = new AssDialogue(curdata); } catch (...) { + // Line didn't parse correcly, assume it's plain text that + // should be pasted in the Text field only curdiag = new AssDialogue(); curdiag->Text = curdata; + // Make sure pasted plain-text lines always are blank-timed + curdiag->Start.SetMS(0); + curdiag->End.SetMS(0); } // Paste over