1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-11 17:41:15 +02:00

Remove spectral selection edges when not in spectral selection.

This commit is contained in:
Steve Daulton 2015-05-19 02:57:08 +01:00
parent 26707aabfa
commit d1994e702e

View File

@ -1806,26 +1806,20 @@ static float sumFreqValues(
AColor::ColorGradientChoice ChooseColorSet( float bin0, float bin1, float selBinLo,
float selBinCenter, float selBinHi, int dashCount, bool isSpectral )
{
if ( (selBinCenter >= 0) && (bin0 <= selBinCenter) && (selBinCenter < bin1) )
if (!isSpectral)
return AColor::ColorGradientTimeSelected;
if ((selBinCenter >= 0) && (bin0 <= selBinCenter) &&
(selBinCenter < bin1))
return AColor::ColorGradientEdge;
else if (
(0 == dashCount % 2) &&
if ((0 == dashCount % 2) &&
(((selBinLo >= 0) && (bin0 <= selBinLo) && ( selBinLo < bin1)) ||
((selBinHi >= 0) && (bin0 <= selBinHi) && ( selBinHi < bin1))))
return AColor::ColorGradientEdge;
else if (
(selBinLo < 0 || selBinLo < bin1) &&
(selBinHi < 0 || selBinHi > bin0) )
if (isSpectral) {
if ((selBinLo < 0 || selBinLo < bin1) && (selBinHi < 0 || selBinHi > bin0))
return AColor::ColorGradientTimeAndFrequencySelected;
}
else {
return AColor::ColorGradientTimeSelected;
}
else
return AColor::ColorGradientTimeSelected;
}
return AColor::ColorGradientTimeSelected;
}
void TrackArtist::DrawClipSpectrum(WaveTrackCache &cache,