Renumber after changing format - thx moi15moi :)

Related to #5429
This commit is contained in:
Nikolaj Olsson 2021-10-31 15:44:11 +01:00
parent c5e18b3abb
commit e90ecb4236

View File

@ -2133,6 +2133,7 @@ namespace Nikse.SubtitleEdit.Forms
var formatType = format.GetType();
_oldSubtitleFormat = oldFormat;
var oldParagraphCount = _subtitle.Paragraphs.Count;
if (_oldSubtitleFormat == null)
{
if (!_loading && _lastChangedToFormat != format.FriendlyName)
@ -2170,9 +2171,18 @@ namespace Nikse.SubtitleEdit.Forms
}
}
SaveSubtitleListviewIndices();
_subtitle.Renumber();
if (oldParagraphCount == _subtitle.Paragraphs.Count)
{
SaveSubtitleListviewIndices();
}
SubtitleListview1.Fill(_subtitle, _subtitleOriginal);
RestoreSubtitleListviewIndices();
if (oldParagraphCount == _subtitle.Paragraphs.Count)
{
RestoreSubtitleListviewIndices();
}
if (_oldSubtitleFormat.HasStyleSupport)
{