From 0187028eb0e7e3e42b9799b7e55388f1d099abdb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 24 Jan 2009 01:17:26 +0000 Subject: [PATCH] Fix state setting in the port matrix, broken a few commits ago. git-svn-id: svn://localhost/ardour2/branches/3.0@4436 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/port_matrix_grid.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/port_matrix_grid.cc b/gtk2_ardour/port_matrix_grid.cc index e202332d86..13e1dcf4c2 100644 --- a/gtk2_ardour/port_matrix_grid.cc +++ b/gtk2_ardour/port_matrix_grid.cc @@ -194,16 +194,22 @@ PortMatrixGrid::button_press (double x, double y, int b) } } + if (our_bundle && other_bundle) { - bool const s = _port_matrix->get_state ( + PortMatrix::State const s = _port_matrix->get_state ( our_bundle, our_channel, other_bundle, other_channel ); + if (s == PortMatrix::ASSOCIATED || s == PortMatrix::NOT_ASSOCIATED) { + + bool const n = !(s == PortMatrix::ASSOCIATED); + _port_matrix->set_state ( our_bundle, our_channel, other_bundle, other_channel, - !s, 0 + n, 0 ); + } require_render (); _body->queue_draw ();