mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Try to fix Replace issue - thx loyaldragon :)
This commit is contained in:
parent
722a984c6f
commit
07f0c9cb11
@ -5467,6 +5467,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
tb.SelectedText = _findHelper.ReplaceText;
|
tb.SelectedText = _findHelper.ReplaceText;
|
||||||
msg = _language.OneReplacementMade + " ";
|
msg = _language.OneReplacementMade + " ";
|
||||||
|
_findHelper.SelectedPosition += _findHelper.ReplaceText.Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_findHelper.FindNext(_subtitle, _subtitleAlternate, _findHelper.SelectedIndex, _findHelper.SelectedPosition, Configuration.Settings.General.AllowEditOfOriginalSubtitle))
|
if (_findHelper.FindNext(_subtitle, _subtitleAlternate, _findHelper.SelectedIndex, _findHelper.SelectedPosition, Configuration.Settings.General.AllowEditOfOriginalSubtitle))
|
||||||
@ -5513,18 +5514,25 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
if (replaceDialog != null && !replaceDialog.IsDisposed)
|
if (replaceDialog != null && !replaceDialog.IsDisposed)
|
||||||
{
|
{
|
||||||
replaceDialog.Dispose();
|
replaceDialog.Dispose();
|
||||||
replaceDialog = null;
|
|
||||||
}
|
}
|
||||||
_findHelper.InProgress = false;
|
_findHelper.InProgress = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (replaceDialog != null && !replaceDialog.IsDisposed)
|
||||||
|
{
|
||||||
|
replaceDialog.Dispose();
|
||||||
|
}
|
||||||
|
_findHelper.InProgress = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Replace(replaceDialog);
|
Replace(replaceDialog);
|
||||||
if (replaceDialog != null && !replaceDialog.IsDisposed)
|
if (replaceDialog != null && !replaceDialog.IsDisposed)
|
||||||
{
|
{
|
||||||
replaceDialog.Dispose();
|
replaceDialog.Dispose();
|
||||||
replaceDialog = null;
|
|
||||||
}
|
}
|
||||||
_findHelper.InProgress = false;
|
_findHelper.InProgress = false;
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user