1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-02 08:59:28 +02:00

Selection toolbars use a little less idle time after commit f0ae4c3

This commit is contained in:
Paul Licameli 2019-07-05 13:59:47 -04:00
parent 8c59f66583
commit ce31e2f35e
2 changed files with 17 additions and 13 deletions

View File

@ -676,6 +676,7 @@ void SelectionBar::ValuesToControls()
// A time has been set. Update the control values.
void SelectionBar::SetTimes(double start, double end, double audio)
{
if ( start != mStart || end != mEnd || audio != mAudio) {
mStart = start;
mEnd = end;
mLength = end-start;
@ -683,6 +684,7 @@ void SelectionBar::SetTimes(double start, double end, double audio)
mAudio = audio;
ValuesToControls();
}
}
void SelectionBar::SetSnapTo(int snap)

View File

@ -465,6 +465,7 @@ void SpectralSelectionBar::SetBounds()
void SpectralSelectionBar::SetFrequencies(double bottom, double top)
{
if ( mLow != bottom || mHigh != top ) {
mLow = bottom;
mHigh = top;
@ -474,6 +475,7 @@ void SpectralSelectionBar::SetFrequencies(double bottom, double top)
mWidth = mCenter = -1.0;
ValuesToControls();
}
}
void SpectralSelectionBar::SetFrequencySelectionFormatName(const NumericFormatSymbol & formatName)