From 54fac9abacab99851f281524f78b5a17ab417908 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 5 Jun 2023 20:04:41 +0200 Subject: [PATCH] Allow user to not be reminded about tempo-map not being pasted --- gtk2_ardour/editor_ops.cc | 8 +++++++- gtk2_ardour/ui_config_vars.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 276500d026..aea7314891 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -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 ()); diff --git a/gtk2_ardour/ui_config_vars.h b/gtk2_ardour/ui_config_vars.h index 768033d9bc..229fd356d3 100644 --- a/gtk2_ardour/ui_config_vars.h +++ b/gtk2_ardour/ui_config_vars.h @@ -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