From 5700d10890669e8a890288b208808f8a8467855a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 7 Dec 2011 17:50:56 +0000 Subject: Check that adding a port to an IO is ok with the processors in its route, and raise an error if not (part of #4535). git-svn-id: svn://localhost/ardour2/branches/3.0@10938 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/port_matrix.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/port_matrix.cc') diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc index 576b8789ca..8bdc1c4cc0 100644 --- a/gtk2_ardour/port_matrix.cc +++ b/gtk2_ardour/port_matrix.cc @@ -26,6 +26,7 @@ #include #include #include +#include #include "ardour/bundle.h" #include "ardour/types.h" #include "ardour/session.h" @@ -684,7 +685,14 @@ PortMatrix::add_channel (boost::shared_ptr b, DataType t) boost::shared_ptr io = io_from_bundle (b); if (io) { - io->add_port ("", this, t); + int const r = io->add_port ("", this, t); + if (r == -1) { + Gtk::MessageDialog msg (_("It is not possible to add a port here, as the first processor in the track or buss cannot " + "support the new configuration." + )); + msg.set_title (_("Cannot add port")); + msg.run (); + } } } -- cgit v1.2.3