mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Toggle sort direction in new "Multiple replacde" rules sort
This commit is contained in:
parent
cc18f0a0fa
commit
071556c1ca
@ -5,6 +5,7 @@
|
||||
* Add Whisper CPP model "small.en-q5_1.bin"
|
||||
* Add shortcut for "Translate selected lines"
|
||||
* Add Gemini translate (beta, not all regions) - thx darnn
|
||||
* Add sorting of rules in "Multiple replace" - thx caioeverest
|
||||
* IMPROVED:
|
||||
* Update Korean translation - thx domddol
|
||||
* Update Portuguese translation - thx hugok79
|
||||
|
@ -31,6 +31,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private Subtitle _subtitle;
|
||||
private IReloadSubtitle _reloadSubtitle;
|
||||
private Subtitle _original;
|
||||
private bool _sortAscending;
|
||||
public Subtitle FixedSubtitle { get; private set; }
|
||||
public int FixCount { get; private set; }
|
||||
public List<int> DeleteIndices { get; }
|
||||
@ -1536,7 +1537,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void SortItems(int column)
|
||||
{
|
||||
var items = new List<MultipleSearchAndReplaceSetting>();
|
||||
List<MultipleSearchAndReplaceSetting> items;
|
||||
|
||||
_sortAscending = !_sortAscending;
|
||||
|
||||
switch (column)
|
||||
{
|
||||
@ -1548,6 +1551,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
default: items = _currentGroup.Rules.OrderBy(i => i.FindWhat).ToList(); break;
|
||||
}
|
||||
|
||||
if (!_sortAscending)
|
||||
{
|
||||
items.Reverse();
|
||||
}
|
||||
|
||||
_currentGroup.Rules.Clear();
|
||||
_currentGroup.Rules.AddRange(items);
|
||||
UpdateViewFromModel(Configuration.Settings.MultipleSearchAndReplaceGroups, _currentGroup);
|
||||
|
Loading…
Reference in New Issue
Block a user