Allow user to not be reminded about tempo-map not being pasted

This commit is contained in:
Robin Gareus 2023-06-05 20:04:41 +02:00
parent 522c8f9426
commit 54fac9abac
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 8 additions and 1 deletions

View File

@ -2709,12 +2709,18 @@ Editor::cut_copy_section (bool copy)
}
#if 1
TempoMap::SharedPtr tmap (TempoMap::use());
if (tmap->tempos ().size () > 1 || tmap->meters ().size () > 1 || tmap->bartimes ().size () > 1) {
if ((tmap->tempos ().size () > 1 || tmap->meters ().size () > 1 || tmap->bartimes ().size () > 1) && UIConfiguration::instance().get_ask_cut_copy_section_tempo_map ()) {
ArdourMessageDialog msg (_("Cut/Copy Section does not yet include the Tempo Map\nDo you still want to proceed?"), false, MESSAGE_QUESTION, BUTTONS_YES_NO, true) ;
msg.set_title (_("Cut/Copy without Tempo Map"));
Gtk::CheckButton cb (_("Do not show this dialog again."));
msg.get_vbox()->pack_start (cb);
cb.show ();
if (msg.run () != RESPONSE_YES) {
return;
}
if (cb.get_active ()) {
UIConfiguration::instance().set_ask_cut_copy_section_tempo_map (false);
}
}
#endif
timepos_t to (get_preferred_edit_position ());

View File

@ -150,6 +150,7 @@ UI_CONFIG_VARIABLE (bool, one_plugin_window_only, "one-plugin-window-only", fals
UI_CONFIG_VARIABLE (int, default_lower_midi_note, "default-lower-midi-note", 60)
UI_CONFIG_VARIABLE (int, default_upper_midi_note, "default-upper-midi-note", 71)
UI_CONFIG_VARIABLE (bool, ask_before_closing_last_window, "ask-before-closing-last-window", true)
UI_CONFIG_VARIABLE (bool, ask_cut_copy_section_tempo_map, "ask-cut-copy-section-tempo-map", true)
UI_CONFIG_VARIABLE (std::string, freesound_dir, "freesound-dir", "")
UI_CONFIG_VARIABLE (int, max_note_height, "max-note-height", 20)
#ifdef MIXBUS