From f639e9cacf22f2afe262be6456caab7acb7e920a Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Fri, 30 Aug 2024 13:17:32 +0200 Subject: [PATCH] Fix for pasting ASSA in the waveform - thx MitchSirco :) Fix #8781 --- Changelog.txt | 3 ++- src/ui/Forms/Main.cs | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 689c9ec97..ffaae042d 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -38,7 +38,7 @@ * Fix combo boxes popup in "Measurement converter" - thx Dehrimon * Detect change switching between UTF-8-no-bom/UTF-8-with-bom - thx Minherre * Fix crash in Whisper UI (bug in Dutch translation) - thx hpcs444/tsg040 - * Fix bad xml replace in "TTML 1.0" - thx Info + * Fix bad XML replace in "TTML 1.0" - thx Info * Fix undo after "merge selected" for 3+ lines - thx Llorx * Fix crash with resolution 0x0 in "Generate transparent subs" - thx hellobigbean* * Fix edge case when parsing ms - thx PoneyClairDeLune @@ -46,6 +46,7 @@ * Fix undesired line-break in auto-translate - thx Dyo-Anima * Fix for batch translate via Ollama - thx Anon1337Elite * Fix spell check shortcut (was the same as save-as, now Alt+F7) - thx Javier + * Fix for pasting ASSA in the waveform - thx MitchSirco 4.0.7 (8th July 2024) diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index a5039ddbe..b3835594b 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -825,9 +825,16 @@ namespace Nikse.SubtitleEdit.Forms { var text = Clipboard.GetText(); var tmp = new Subtitle(); - var format = new SubRip(); + SubtitleFormat format = new SubRip(); var list = new List(text.SplitToLines()); + + if (new AdvancedSubStationAlpha().IsMine(list, string.Empty)) + { + format = new AdvancedSubStationAlpha(); + } + format.LoadSubtitle(tmp, list, null); + if (videoPositionInMilliseconds >= 0 && tmp.Paragraphs.Count > 0) { if (tmp.Paragraphs[0].StartTime.TotalMilliseconds > videoPositionInMilliseconds)