13
0

The return of the tempo-map cut/copy section warning

see also 964600b9bd.
This commit is contained in:
Robin Gareus 2024-07-17 17:57:44 +02:00
parent e175410f54
commit cd3c65fbda
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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);