From cd3c65fbdab537440c53baf72ca748c5ad60999c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 17 Jul 2024 17:57:44 +0200 Subject: [PATCH] The return of the tempo-map cut/copy section warning see also 964600b9bdc5445bec553ca57fedb07c8c165918. --- gtk2_ardour/editor_ops.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 1025c6c6e0..65b5025ce1 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -2814,7 +2814,22 @@ Editor::cut_copy_section (ARDOUR::SectionOperation const op) if (!get_selection_extents (start, end) || !_session) { return; } - +#if 1 + TempoMap::SharedPtr tmap (TempoMap::use()); + 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 correctly include tempo/meter changes\nDo you still want to proceed?"), false, MESSAGE_QUESTION, BUTTONS_YES_NO, true) ; + msg.set_title (_("Cut/Copy 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 = Profile->get_mixbus () ? timepos_t (_session->audible_sample ()) : get_preferred_edit_position (); _session->cut_copy_section (start, end, to, op);