diff options
author | Carl Hetherington <carl@carlh.net> | 2009-01-24 01:17:26 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-01-24 01:17:26 +0000 |
commit | 0187028eb0e7e3e42b9799b7e55388f1d099abdb (patch) | |
tree | 3ce84041415191094b73aee304176290bf06700f /gtk2_ardour/port_matrix_grid.cc | |
parent | e4fbf1c48e562c7242ed317cd8bb804c475127f4 (diff) |
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
Diffstat (limited to 'gtk2_ardour/port_matrix_grid.cc')
-rw-r--r-- | gtk2_ardour/port_matrix_grid.cc | 10 |
1 files 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 (); |