From aed9adceee10d85779ca051d344e6870470c3bbe Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 22 Jul 2021 10:33:27 -0600 Subject: [PATCH] display triggerbox GUI window when adding a track that has one --- gtk2_ardour/ardour_ui.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 3383d199c0..ba81e96201 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -206,6 +206,7 @@ #include "time_info_box.h" #include "timers.h" #include "transport_masters_dialog.h" +#include "triggerbox_ui.h" #include "utils.h" #include "utils_videotl.h" #include "video_server_dialog.h" @@ -1532,6 +1533,15 @@ ARDOUR_UI::session_add_midi_route ( error << string_compose(P_("could not create %1 new mixed track", "could not create %1 new mixed tracks", how_many), how_many) << endmsg; } + boost::shared_ptr tb (tracks.front()->triggerbox()); + if (tb) { + TriggerBoxWindow* tbw = new TriggerBoxWindow (*(tb.get())); + tbw->present (); + cerr << " window presented\n"; + } else { + cerr << "no trigger box\n"; + } + } else { RouteList routes; @@ -1575,6 +1585,15 @@ ARDOUR_UI::session_add_audio_route ( << endmsg; } + boost::shared_ptr tb (tracks.front()->triggerbox()); + if (tb) { + TriggerBoxWindow* tbw = new TriggerBoxWindow (*(tb.get())); + tbw->present (); + cerr << " window presented\n"; + } else { + cerr << "no trigger box\n"; + } + } else { routes = _session->new_audio_route (input_channels, output_channels, route_group, how_many, name_template, PresentationInfo::AudioBus, order);