mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-10 17:11:17 +02:00
Bug2158: Selection bar readouts should update properly with drop-down
This commit is contained in:
parent
0192af2e97
commit
302ede1043
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user