mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 15:49:41 +02:00
bug 2081 - Frequencies added to labels
Mitigate bug by making old label format the default and the addition of frequency ranges optional.
This commit is contained in:
parent
fed26b9896
commit
0a8a25e246
@ -45,6 +45,7 @@ for drawing different aspects of the label and its text box.
|
||||
|
||||
#include "Prefs.h"
|
||||
#include "ProjectFileIORegistry.h"
|
||||
#include "prefs/ImportExportPrefs.h"
|
||||
|
||||
#include "effects/TimeWarper.h"
|
||||
#include "widgets/AudacityMessageBox.h"
|
||||
@ -443,8 +444,9 @@ void LabelStruct::Export(wxTextFile &file) const
|
||||
// Do we need more lines?
|
||||
auto f0 = selectedRegion.f0();
|
||||
auto f1 = selectedRegion.f1();
|
||||
if (f0 == SelectedRegion::UndefinedFrequency &&
|
||||
f1 == SelectedRegion::UndefinedFrequency)
|
||||
if ((f0 == SelectedRegion::UndefinedFrequency &&
|
||||
f1 == SelectedRegion::UndefinedFrequency) ||
|
||||
ImportExportPrefs::LabelStyleSetting.ReadEnum())
|
||||
return;
|
||||
|
||||
// Write a \ character at the start of a second line,
|
||||
|
@ -76,6 +76,19 @@ EnumSetting< bool > ImportExportPrefs::ExportDownMixSetting{
|
||||
wxT("/FileFormats/ExportDownMix"),
|
||||
};
|
||||
|
||||
EnumSetting< bool > ImportExportPrefs::LabelStyleSetting{
|
||||
wxT("/FileFormats/LabelStyleChoice"),
|
||||
{
|
||||
EnumValueSymbol{ wxT("Standard"), XXO("S&tandard") },
|
||||
EnumValueSymbol{ wxT("Extended"), XXO("E&xtended (with frequency ranges)") },
|
||||
},
|
||||
0, // true
|
||||
|
||||
{
|
||||
true, false,
|
||||
},
|
||||
};
|
||||
|
||||
EnumSetting< bool > ImportExportPrefs::AllegroStyleSetting{
|
||||
wxT("/FileFormats/AllegroStyleChoice"),
|
||||
{
|
||||
@ -114,6 +127,18 @@ void ImportExportPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
false});
|
||||
}
|
||||
S.EndStatic();
|
||||
|
||||
S.StartStatic(XO("Exported Label Style:"));
|
||||
{
|
||||
S.StartRadioButtonGroup(ImportExportPrefs::LabelStyleSetting);
|
||||
{
|
||||
S.TieRadioButton();
|
||||
S.TieRadioButton();
|
||||
}
|
||||
S.EndRadioButtonGroup();
|
||||
}
|
||||
S.EndStatic();
|
||||
|
||||
#ifdef USE_MIDI
|
||||
S.StartStatic(XO("Exported Allegro (.gro) files save time as:"));
|
||||
{
|
||||
|
@ -27,6 +27,7 @@ class ImportExportPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
static EnumSetting< bool > ExportDownMixSetting;
|
||||
static EnumSetting< bool > LabelStyleSetting;
|
||||
static EnumSetting< bool > AllegroStyleSetting;
|
||||
|
||||
ImportExportPrefs(wxWindow * parent, wxWindowID winid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user