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

Bug 891 - Number-entering bug in kHz High Frequencies. Unfriendly to have to enter High first if new Low is above High.

Spectral frequencies now behave like temporal selection, nudging the 'other' value up or down so that the low and high values don't cross over.
This commit is contained in:
James Crook 2018-04-09 16:30:09 +01:00
parent 7ab4b8c6df
commit 0dd3aef6bc

View File

@ -311,11 +311,20 @@ void SpectralSelectionBar::ModifySpectralSelection(bool done)
top = std::min(nyq, top);
else
top = SelectedRegion::UndefinedFrequency;
// These have to be in the right order.
if( bottom > top ){
// Oops. We must fix the order.
if( mLowCtrl->HasFocus() )
top = bottom;
else
bottom = top;
}
}
mLow = bottom;
mHigh = top;
SetBounds();
//SetBounds();
// Notify project and track panel, which may change
// the values again, and call back to us in SetFrequencies()