1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-10 09:01:13 +02:00

Bug2158: Selection bar readouts should update properly with drop-down

This commit is contained in:
Paul Licameli 2019-07-31 14:51:17 -04:00
parent 0192af2e97
commit 302ede1043
2 changed files with 6 additions and 2 deletions

View File

@ -676,12 +676,15 @@ 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) {
if ( start != mStart || end != mEnd || audio != mAudio
|| mLastSelectionMode != mSelectionMode
) {
mStart = start;
mEnd = end;
mLength = end-start;
mCenter = (end+start)/2.0;
mAudio = audio;
mLastSelectionMode = mSelectionMode;
ValuesToControls();
}

View File

@ -94,7 +94,8 @@ class SelectionBar final : public ToolBar {
int mDrive1;
int mDrive2;
int mSelectionMode;
int mSelectionMode{ 0 };
int mLastSelectionMode{ 0 };
NumericTextCtrl *mStartTime;
NumericTextCtrl *mCenterTime;