From ffa893f23c126425822918e5aa4f52aa4c0f6505 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 18 May 2023 03:45:53 +0200 Subject: [PATCH] Add a warning that cut/copy section does not yet include the the Tempo Map --- gtk2_ardour/editor_ops.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 11db3b4006..301fd47aaa 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -2715,6 +2715,16 @@ Editor::cut_copy_section (bool copy) 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) { + 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")); + if (msg.run () != RESPONSE_YES) { + return; + } + } +#endif timepos_t to (get_preferred_edit_position ()); _session->cut_copy_section (start, end, to, copy);