Undo select old selected line - thx Flitskikker :)

Related to #7601
This commit is contained in:
niksedk 2023-11-11 14:21:23 +01:00
parent 85df9bd327
commit 40590d1b65
3 changed files with 11 additions and 1 deletions

View File

@ -16,6 +16,7 @@
* Take ASSA style from file in CLI - thx Ninelpienel
* Split long lines in CLI - thx BenJamesAndo
* Add new "Remove text for HI" option "only music symbols" - thx fraternl
* Add format "Cavena 890" to "Batch convert" - thx Steve
* IMPROVED:
* Update Korean translation - thx domddol
* Update Italian language - thx bovirus
@ -65,6 +66,7 @@
* Fix issues with "Set end, add new, and go to new" - thx Lorqu1n/Flitskikker
* Fix some missing Thai characters in format PAC - thx thehulk
* Fix crash in spell check - thx Omair
* Fix crash minimizing ASSA batch styles - thx Åke
4.0.1 (16th September 2023)

View File

@ -43,4 +43,5 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Tesseract/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unbreak/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Undocked/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Vanc/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Vanc/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Vosk/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@ -8086,11 +8086,13 @@ namespace Nikse.SubtitleEdit.Forms
try
{
var undoLineIndex = -1;
int selectedIndex = FirstSelectedIndex;
if (undo)
{
_subtitle.HistoryItems[_undoIndex].RedoParagraphs = new List<Paragraph>();
_subtitle.HistoryItems[_undoIndex].RedoParagraphsOriginal = new List<Paragraph>();
undoLineIndex = _subtitle.HistoryItems[_undoIndex].LineIndex;
foreach (var p in _subtitle.Paragraphs)
{
@ -8206,6 +8208,11 @@ namespace Nikse.SubtitleEdit.Forms
UpdateSourceView();
SubtitleListview1.Fill(_subtitle, _subtitleOriginal);
if (undoLineIndex >= 0 && undoLineIndex < _subtitle.Paragraphs.Count)
{
selectedIndex = undoLineIndex;
}
if (selectedIndex >= _subtitle.Paragraphs.Count)
{
SubtitleListview1.SelectIndexAndEnsureVisible(_subtitle.Paragraphs.Count - 1, true);