diff options
author | Carl Hetherington <carl@carlh.net> | 2011-12-07 17:50:56 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-12-07 17:50:56 +0000 |
commit | 5700d10890669e8a890288b208808f8a8467855a (patch) | |
tree | fce2931d21b15f7477911b8d09ac61582deb8e54 /gtk2_ardour/port_matrix.cc | |
parent | ff7785142de6fb8fa57e3334f76195122fad111b (diff) |
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
Diffstat (limited to 'gtk2_ardour/port_matrix.cc')
-rw-r--r-- | gtk2_ardour/port_matrix.cc | 10 |
1 files changed, 9 insertions, 1 deletions
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 <gtkmm/menu_elems.h> #include <gtkmm/window.h> #include <gtkmm/stock.h> +#include <gtkmm/messagedialog.h> #include "ardour/bundle.h" #include "ardour/types.h" #include "ardour/session.h" @@ -684,7 +685,14 @@ PortMatrix::add_channel (boost::shared_ptr<Bundle> b, DataType t) boost::shared_ptr<IO> 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 (); + } } } |