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
This commit is contained in:
Carl Hetherington 2009-01-24 01:17:26 +00:00
parent e4fbf1c48e
commit 0187028eb0

View File

@ -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 ();