summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-11-25 23:46:24 +0000
committerCarl Hetherington <carl@carlh.net>2010-11-25 23:46:24 +0000
commit54cbc45a5a40f4eefd64fa41ad9029f5f8f6a84f (patch)
tree558e7cb27683030787fcb4d5654bd4b58ebd8e21 /gtk2_ardour/port_matrix.cc
parent28c004f4fb0750b6a4236552bcc8de4946b9b164 (diff)
Prevent removal of route inputs when the plugins cannot be configured with the new number. Rework locking so that the process lock is held from the point that a route input is removed until after the processors are reconfigured; fixes #3548.
git-svn-id: svn://localhost/ardour2/branches/3.0@8089 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix.cc')
-rw-r--r--gtk2_ardour/port_matrix.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 113a11c116..052a26c25c 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -25,6 +25,7 @@
#include <gtkmm/menushell.h>
#include <gtkmm/menu_elems.h>
#include <gtkmm/window.h>
+#include <gtkmm/stock.h>
#include "ardour/bundle.h"
#include "ardour/types.h"
#include "ardour/session.h"
@@ -33,6 +34,7 @@
#include "port_matrix.h"
#include "port_matrix_body.h"
#include "port_matrix_component.h"
+#include "ardour_dialog.h"
#include "i18n.h"
#include "gui_thread.h"
#include "utils.h"
@@ -686,7 +688,16 @@ PortMatrix::remove_channel (ARDOUR::BundleChannel b)
if (io) {
Port* p = io->nth (b.channel);
if (p) {
- io->remove_port (p, this);
+ int const r = io->remove_port (p, this);
+ if (r == -1) {
+ ArdourDialog d (_("Port removal not allowed"));
+ Label l (_("This port cannot be removed, as the first plugin in the track or buss cannot accept the new number of inputs."));
+ d.get_vbox()->pack_start (l);
+ d.add_button (Stock::OK, RESPONSE_ACCEPT);
+ d.set_modal (true);
+ d.show_all ();
+ d.run ();
+ }
}
}
}