Tweak mouseover on port matrix.

git-svn-id: svn://localhost/ardour2/branches/3.0@6278 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-12-04 12:49:58 +00:00
parent 24f0f5ecbc
commit be79bc7916

View file

@ -296,17 +296,15 @@ PortMatrixRowLabels::motion (double x, double y)
{
ARDOUR::BundleChannel const w = position_to_channel (y, x, _matrix->visible_rows());
if (w.bundle == 0) {
/* not over any bundle */
_body->set_mouseover (PortMatrixNode ());
return;
}
uint32_t const bw = _longest_bundle_name + 2 * name_pad();
bool done = false;
if (w.bundle) {
if (
(_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM && x < bw) ||
(_matrix->arrangement() == PortMatrix::TOP_TO_RIGHT && x > (_width - bw))
(_matrix->arrangement() == PortMatrix::TOP_TO_RIGHT && x > (_width - bw) && x < _width)
) {
@ -320,10 +318,20 @@ PortMatrixRowLabels::motion (double x, double y)
}
_body->set_mouseover (n);
done = true;
} else {
} else if (x < _width) {
_body->set_mouseover (PortMatrixNode (w, ARDOUR::BundleChannel ()));
done = true;
}
}
if (!done) {
/* not over any bundle */
_body->set_mouseover (PortMatrixNode ());
return;
}
}