mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Keep bookmarks after edit in source view - thx Ingo :)
This commit is contained in:
parent
9541f2f9ef
commit
9c7858ec64
@ -3,6 +3,7 @@
|
||||
3.5.17 (xth September 2020) BETA
|
||||
* NEW:
|
||||
* Add new subtitle format - thx Holmgeir
|
||||
* Add shortcuts for Tools menu items Split/Append/Join - thx z3us
|
||||
* IMPROVED:
|
||||
* Update Bulgarian translation - thx KalinM
|
||||
* Update Hungarian translation - thx Zityi
|
||||
@ -18,6 +19,7 @@
|
||||
* Fix "Import plain text" for small resolutions - thx doquan0
|
||||
* Fix syntax coloring after replace - thx OmrSi
|
||||
* Fix minor label issue at startup - thx Bill
|
||||
* Keep bookmarks after edit in source view - thx Ingo
|
||||
|
||||
|
||||
3.5.16 (16th June 2020)
|
||||
|
@ -5952,7 +5952,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
SaveSubtitleListviewIndices();
|
||||
if (!string.IsNullOrWhiteSpace(textBoxSource.Text))
|
||||
{
|
||||
SubtitleFormat format = GetCurrentSubtitleFormat();
|
||||
var oldSubtitle = new Subtitle(_subtitle);
|
||||
var format = GetCurrentSubtitleFormat();
|
||||
var list = textBoxSource.Lines.ToList();
|
||||
format = new Subtitle().ReloadLoadSubtitle(list, null, format);
|
||||
if (format == null)
|
||||
@ -5977,6 +5978,18 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
index++;
|
||||
}
|
||||
|
||||
for (int i = 0; i < oldSubtitle.Paragraphs.Count; i++)
|
||||
{
|
||||
if (oldSubtitle.Paragraphs[i].Bookmark != null)
|
||||
{
|
||||
var newParagraph = _subtitle.GetFirstAlike(oldSubtitle.Paragraphs[i]);
|
||||
if (newParagraph != null)
|
||||
{
|
||||
newParagraph.Bookmark = oldSubtitle.Paragraphs[i].Bookmark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Configuration.Settings.General.CurrentVideoOffsetInMs != 0)
|
||||
{
|
||||
_subtitle.AddTimeToAllParagraphs(TimeSpan.FromMilliseconds(-Configuration.Settings.General.CurrentVideoOffsetInMs));
|
||||
|
Loading…
Reference in New Issue
Block a user