| 82 | } |
| 83 | |
| 84 | bool 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 | |
| 113 | void AudacityMirProject::OnClipsSynchronized() |
| 114 | { |
nothing calls this directly
no test coverage detected