Merge pull request #2815 from ivandrofly/upd

Minor clean-up
This commit is contained in:
Nikolaj Olsson 2018-03-08 20:22:16 +01:00 committed by GitHub
commit 4ab3e063d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 48 deletions

View File

@ -256,7 +256,6 @@ namespace Nikse.SubtitleEdit.Forms
bool newLine = false;
int lineNumber = 0;
float leftMargin = left;
bool italicFromStart = false;
int newLinePathPoint = -1;
Color c = _subtitleColor;
var colorStack = new Stack<Color>();
@ -375,7 +374,6 @@ namespace Nikse.SubtitleEdit.Forms
}
else if (text.Substring(i).StartsWith("<i>", StringComparison.OrdinalIgnoreCase))
{
italicFromStart = i == 0;
if (sb.Length > 0)
{
TextDraw.DrawText(font, sf, path, sb, isItalic, subtitleFontBold, false, left, top, ref newLine, leftMargin, ref newLinePathPoint);
@ -409,8 +407,6 @@ namespace Nikse.SubtitleEdit.Forms
leftMargin = lefts[lineNumber];
left = leftMargin;
}
if (isItalic)
italicFromStart = true;
}
else
{

View File

@ -4820,10 +4820,7 @@ namespace Nikse.SubtitleEdit.Forms
return;
}
int replaceCount = 0;
bool searchStringFound = true;
if (searchStringFound)
{
searchStringFound = false;
var searchStringFound = false;
int start = textBoxSource.SelectionStart;
if (isFirst)
{
@ -4872,7 +4869,6 @@ namespace Nikse.SubtitleEdit.Forms
Replace(replaceDialog);
return;
}
}
ReloadFromSourceView();
if (replaceCount == 0)
ShowStatus(_language.FoundNothingToReplace);