Fixed some binary AND to logical AND operators - thx Ivandrofly :)

This commit is contained in:
niksedk 2015-03-14 15:18:49 +01:00
parent 92c54a6035
commit dd7b298a85
2 changed files with 6 additions and 6 deletions

View File

@ -10088,12 +10088,12 @@ namespace Nikse.SubtitleEdit.Forms
audioVisualizer.VerticalZoomPercent += 0.05;
e.SuppressKeyPress = true;
}
if (audioVisualizer != null && audioVisualizer.Visible & e.KeyData == _waveformZoomIn)
if (audioVisualizer != null && audioVisualizer.Visible && e.KeyData == _waveformZoomIn)
{
audioVisualizer.ZoomIn();
e.SuppressKeyPress = true;
}
if (audioVisualizer != null && audioVisualizer.Visible & e.KeyData == _waveformZoomOut)
if (audioVisualizer != null && audioVisualizer.Visible && e.KeyData == _waveformZoomOut)
{
audioVisualizer.ZoomOut();
e.SuppressKeyPress = true;
@ -10102,17 +10102,17 @@ namespace Nikse.SubtitleEdit.Forms
{
PlayFirstSelectedSubtitle();
}
else if (audioVisualizer != null && audioVisualizer.Visible & e.KeyData == _waveformPlaySelection)
else if (audioVisualizer != null && audioVisualizer.Visible && e.KeyData == _waveformPlaySelection)
{
toolStripMenuItemWaveformPlaySelection_Click(null, null);
e.SuppressKeyPress = true;
}
else if (audioVisualizer != null && audioVisualizer.Visible & e.KeyData == _waveformSearchSilenceForward)
else if (audioVisualizer != null && audioVisualizer.Visible && e.KeyData == _waveformSearchSilenceForward)
{
audioVisualizer.FindDataBelowThreshold(Configuration.Settings.VideoControls.WaveformSeeksSilenceMaxVolume, Configuration.Settings.VideoControls.WaveformSeeksSilenceDurationSeconds);
e.SuppressKeyPress = true;
}
else if (audioVisualizer != null && audioVisualizer.Visible & e.KeyData == _waveformSearchSilenceBack)
else if (audioVisualizer != null && audioVisualizer.Visible && e.KeyData == _waveformSearchSilenceBack)
{
audioVisualizer.FindDataBelowThresholdBack(Configuration.Settings.VideoControls.WaveformSeeksSilenceMaxVolume, Configuration.Settings.VideoControls.WaveformSeeksSilenceDurationSeconds);
e.SuppressKeyPress = true;

View File

@ -3153,7 +3153,7 @@ namespace Nikse.SubtitleEdit.Logic
int idxp = text.IndexOf('"');
//"Foo " bar.
if ((idxp >= 0 && idxp < idx) & AllLettersAndNumbers.Contains(text[idx - 1]) && !" \r\n".Contains(text[idxp + 1]))
if ((idxp >= 0 && idxp < idx) && AllLettersAndNumbers.Contains(text[idx - 1]) && !" \r\n".Contains(text[idxp + 1]))
{
text = text.Remove(idx, 1);
}