Four more binary AND to logical AND operators

This commit is contained in:
Waldi Ravens 2015-03-14 19:43:16 +02:00
parent dd7b298a85
commit 2e10a38626
3 changed files with 4 additions and 4 deletions

View File

@ -10076,13 +10076,13 @@ namespace Nikse.SubtitleEdit.Forms
AutoBalanceLinesAndAllow2PlusLines();
e.SuppressKeyPress = true;
}
else if (audioVisualizer != null && audioVisualizer.Visible & e.KeyData == _waveformVerticalZoom)
else if (audioVisualizer != null && audioVisualizer.Visible && e.KeyData == _waveformVerticalZoom)
{
if (audioVisualizer.VerticalZoomPercent >= 0.1)
audioVisualizer.VerticalZoomPercent -= 0.05;
e.SuppressKeyPress = true;
}
else if (audioVisualizer != null && audioVisualizer.Visible & e.KeyData == _waveformVerticalZoomOut)
else if (audioVisualizer != null && audioVisualizer.Visible && e.KeyData == _waveformVerticalZoomOut)
{
if (audioVisualizer.VerticalZoomPercent < 1)
audioVisualizer.VerticalZoomPercent += 0.05;

View File

@ -292,7 +292,7 @@ namespace Nikse.SubtitleEdit.Forms
}
var italicStart1 = newParagraph1.Text.IndexOf("<i>", StringComparison.Ordinal);
if (italicStart1 >= 0 && italicStart1 < 10 & newParagraph1.Text.IndexOf("</i>", StringComparison.Ordinal) < 0 &&
if (italicStart1 >= 0 && italicStart1 < 10 && newParagraph1.Text.IndexOf("</i>", StringComparison.Ordinal) < 0 &&
newParagraph2.Text.Contains("</i>") && newParagraph2.Text.IndexOf("<i>", StringComparison.Ordinal) < 0)
{
newParagraph1.Text += "</i>";

View File

@ -119,7 +119,7 @@ namespace Nikse.SubtitleEdit.Logic.Forms
}
var indexOfItalicOpen1 = newParagraph1.Text.IndexOf("<i>", StringComparison.Ordinal);
if (indexOfItalicOpen1 >= 0 && indexOfItalicOpen1 < 10 & newParagraph1.Text.IndexOf("</i>", StringComparison.Ordinal) < 0 &&
if (indexOfItalicOpen1 >= 0 && indexOfItalicOpen1 < 10 && newParagraph1.Text.IndexOf("</i>", StringComparison.Ordinal) < 0 &&
newParagraph2.Text.Contains("</i>") && newParagraph2.Text.IndexOf("<i>", StringComparison.Ordinal) < 0)
{
newParagraph1.Text += "</i>";