diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index ae7dd8f24a..a7289b2685 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -44,6 +44,7 @@ #include "pbd/enumwriter.h" #include "pbd/memento_command.h" #include "pbd/stateful_diff_command.h" +#include "pbd/unwind.h" #include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/utils.h" @@ -72,6 +73,7 @@ #include "ardour/track.h" #include "ardour/types.h" +#include "ardour_message.h" #include "automation_line.h" #include "automation_time_axis.h" #include "editor.h" @@ -119,6 +121,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess, ArdourCanva : SessionHandlePtr (sess) , RouteTimeAxisView (ed, sess, canvas) , _ignore_signals(false) + , _asked_all_automation(false) , _range_scroomer(0) , _piano_roll_header(0) , _note_mode(Sustained) @@ -1202,6 +1205,19 @@ MidiTimeAxisView::show_all_automation (bool apply_to_selection) { using namespace MIDI::Name; + if (!_asked_all_automation) { + ArdourMessageDialog md (_("Are you sure you want to\nshow all MIDI automation lanes?"), false, MESSAGE_QUESTION, BUTTONS_YES_NO); + + md.set_title (_("Show All Automation")); + + md.set_secondary_text (_("There are a total of 16 MIDI channels times 128 Control-Change parameters, not including other MIDI controls. Showing all will add more than 2000 automation lanes which is not generally useful. This will take some time and also slow down Ardour's GUI signficantly.")); + if (md.run () != RESPONSE_YES) { + return; + } + } + + PBD::Unwinder uw (_asked_all_automation, true); + if (apply_to_selection) { _editor.get_selection().tracks.foreach_midi_time_axis ( boost::bind (&MidiTimeAxisView::show_all_automation, _1, false)); diff --git a/gtk2_ardour/midi_time_axis.h b/gtk2_ardour/midi_time_axis.h index 8f3a7cc0a7..fd4e168964 100644 --- a/gtk2_ardour/midi_time_axis.h +++ b/gtk2_ardour/midi_time_axis.h @@ -145,6 +145,7 @@ private: void update_midi_controls_visibility (uint32_t); bool _ignore_signals; + bool _asked_all_automation; std::string _effective_model; std::string _effective_mode; MidiScroomer* _range_scroomer;