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

Need to force call to during initialization

OnUpdate() will not be called if the saved format is that same
as the default.  But, it must be called to set the initial size
and to reset the controlling flag.
This commit is contained in:
Leland Lucius 2020-04-13 23:47:51 -05:00
parent 490dd0d332
commit 73719882bc

View File

@ -170,7 +170,15 @@ void TimerToolBar::SetListener(TimerToolBarListener *l)
// Get (and set) the saved time format // Get (and set) the saved time format
SetAudioTimeFormat(mListener->TT_GetAudioTimeFormat()); SetAudioTimeFormat(mListener->TT_GetAudioTimeFormat());
};
// During initialization, if the saved format is the same as the default,
// OnUpdate() will not be called and need it to set the initial size.
if (mSettingInitialSize) {
wxCommandEvent e;
e.SetInt(mAudioTime->GetFormatIndex());
OnUpdate(e);
}
}
void TimerToolBar::SetAudioTimeFormat(const NumericFormatSymbol & format) void TimerToolBar::SetAudioTimeFormat(const NumericFormatSymbol & format)
{ {