MCPcopy Create free account
hub / github.com/audacity/audacity / ShouldBeReconfigured

Method ShouldBeReconfigured

src/AudacityMirProject.cpp:84–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84bool AudacityMirProject::ShouldBeReconfigured(
85 double newTempo, bool isSingleFileImport)
86{
87 const auto policy = ImportExportPrefs::MusicFileImportSetting.Read();
88 if (policy == wxString("Ask"))
89 {
90 const auto displayedTempo = FormatTempo(newTempo);
91 const auto message =
92 isSingleFileImport ?
93 XO("Audacity detected this file to be %s bpm.\nWould you like to enable music view and set the project tempo to %s?")
94 .Format(displayedTempo, displayedTempo) :
95 XO("Audacity detected one or more files to be %s bpm.\nWould you like to enable music view and set the project tempo to %s?")
96 .Format(displayedTempo, displayedTempo);
97 AudacityDontAskAgainMessageDialog m(
98 &GetProjectPanel(mProject), XO("Music Import"), message);
99 const auto yes = m.ShowDialog();
100 if (m.IsChecked())
101 ImportExportPrefs::MusicFileImportSetting.Write(
102 yes ? wxString("Yes") : wxString("No"));
103 if (yes)
104 mMostSignificantModification = ModificationType::Manual;
105 return yes;
106 }
107 const auto yes = policy == wxString("Yes");
108 if (yes)
109 mMostSignificantModification = ModificationType::Automatic;
110 return yes;
111}
112
113void AudacityMirProject::OnClipsSynchronized()
114{

Callers

nothing calls this directly

Calls 6

FormatTempoFunction · 0.85
IsCheckedMethod · 0.80
wxStringClass · 0.70
ReadMethod · 0.45
ShowDialogMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected