Fix find/replace pos - thx Omair :)

This commit is contained in:
niksedk 2023-09-18 18:56:16 +02:00
parent af646cfb6f
commit 124bbdb00b

View File

@ -6383,8 +6383,8 @@ namespace Nikse.SubtitleEdit.Forms
if (left <= 0 || top <= 0)
{
left = Width / 2 - _findDialog.Width / 2;
top = Height / 2 - _findDialog.Height / 2;
left = Left + Width / 2 - _findDialog.Width / 2;
top = Top + Height / 2 - _findDialog.Height / 2;
}
_findDialog.Left = left;
@ -6624,8 +6624,8 @@ namespace Nikse.SubtitleEdit.Forms
_replaceDialog.SetIcon(toolStripButtonReplace.Image as Bitmap);
_findHelper = _findHelper ?? _replaceDialog.GetFindDialogHelper(_subtitleListViewIndex);
_replaceDialog.Left = Width / 2 - _replaceDialog.Width / 2;
_replaceDialog.Top = Height / 2 - _replaceDialog.Height / 2;
_replaceDialog.Left = Left + Width / 2 - _replaceDialog.Width / 2;
_replaceDialog.Top = Left + Height / 2 - _replaceDialog.Height / 2;
}
_replaceDialog.Initialize(selectedText, _findHelper, IsOriginalEditable && SubtitleListview1.IsOriginalTextColumnVisible);
@ -7164,8 +7164,8 @@ namespace Nikse.SubtitleEdit.Forms
if (_replaceDialog == null || _replaceDialog.IsDisposed)
{
_replaceDialog = new ReplaceDialog(this);
_replaceDialog.Left = Width / 2 - _replaceDialog.Width / 2;
_replaceDialog.Top = Height / 2 - _replaceDialog.Height / 2;
_replaceDialog.Left = Left + Width / 2 - _replaceDialog.Width / 2;
_replaceDialog.Top = Left + Height / 2 - _replaceDialog.Height / 2;
_replaceDialog.SetIcon(toolStripButtonReplace.Image as Bitmap);
_findHelper = _findHelper ?? _replaceDialog.GetFindDialogHelper(_subtitleListViewIndex);
_findHelper.InProgress = true;