From e71809dc0484b850b32497122ec61b0e10c35117 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 30 Sep 2016 11:21:21 -0400 Subject: [PATCH] push2 gui catches port registrations --- libs/surfaces/push2/gui.cc | 3 ++- libs/surfaces/push2/gui.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/surfaces/push2/gui.cc b/libs/surfaces/push2/gui.cc index 1e8e587a42..13d457d0be 100644 --- a/libs/surfaces/push2/gui.cc +++ b/libs/surfaces/push2/gui.cc @@ -145,7 +145,8 @@ P2GUI::P2GUI (Push2& p) /* catch future changes to connection state */ - // p2.ConnectionChange.connect (connection_change_connection, invalidator (*this), boost::bind (&P2GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (port_reg_connection, invalidator (*this), boost::bind (&P2GUI::connection_handler, this), gui_context()); + p2.ConnectionChange.connect (connection_change_connection, invalidator (*this), boost::bind (&P2GUI::connection_handler, this), gui_context()); } P2GUI::~P2GUI () diff --git a/libs/surfaces/push2/gui.h b/libs/surfaces/push2/gui.h index 6188703d5c..828765dec6 100644 --- a/libs/surfaces/push2/gui.h +++ b/libs/surfaces/push2/gui.h @@ -62,6 +62,7 @@ private: void update_port_combos (); PBD::ScopedConnection connection_change_connection; void connection_handler (); + PBD::ScopedConnection port_reg_connection; struct MidiPortColumns : public Gtk::TreeModel::ColumnRecord { MidiPortColumns() {