1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-11 00:45:53 +01:00

Fix Big Time TimerToolBar, Stage III

Fixed issue where format selector could disappear.
Fixed upgrade from 2.3.3.
Remembers time format.
This commit is contained in:
James Crook
2020-02-14 12:02:21 +00:00
parent 1dffc4fe1f
commit 9985b8a9b8
16 changed files with 296 additions and 61 deletions

View File

@@ -47,11 +47,15 @@ const ProjectSettings &ProjectSettings::Get( const AudacityProject &project )
return Get( const_cast< AudacityProject & >( project ) );
}
ProjectSettings::ProjectSettings( AudacityProject &project )
: mProject{ project }
, mSelectionFormat{ NumericTextCtrl::LookupFormat(
ProjectSettings::ProjectSettings(AudacityProject &project)
: mProject{ project }
, mSelectionFormat{ NumericTextCtrl::LookupFormat(
NumericConverter::TIME,
gPrefs->Read(wxT("/SelectionFormat"), wxT("")))
}
, mAudioTimeFormat{ NumericTextCtrl::LookupFormat(
NumericConverter::TIME,
gPrefs->Read(wxT("/SelectionFormat"), wxT("")) )
gPrefs->Read(wxT("/AudioTimeFormat"), wxT("hh:mm:ss")))
}
, mFrequencySelectionFormatName{ NumericTextCtrl::LookupFormat(
NumericConverter::FREQUENCY,
@@ -149,6 +153,16 @@ const NumericFormatSymbol & ProjectSettings::GetSelectionFormat() const
return mSelectionFormat;
}
void ProjectSettings::SetAudioTimeFormat(const NumericFormatSymbol & format)
{
mAudioTimeFormat = format;
}
const NumericFormatSymbol & ProjectSettings::GetAudioTimeFormat() const
{
return mAudioTimeFormat;
}
void ProjectSettings::SetSnapTo(int snap)
{
mSnapTo = snap;