Fix out-of-whack notebook tabs wrt their contents in certain port matrices, broken by my recent tinkering (#4422).

git-svn-id: svn://localhost/ardour2/branches/3.0@10384 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-11-01 21:17:05 +00:00
parent ddff1489f2
commit cca8b8cda0

View File

@ -878,9 +878,18 @@ PortMatrix::visible_ports (int d) const
PortGroupList const & p = _ports[d];
PortGroupList::List::const_iterator j = p.begin ();
/* The logic to compute the index here is a bit twisty because for
the TOP_TO_RIGHT arrangement we reverse the order of the vertical
tabs in setup_notebooks ().
*/
int n = 0;
if (d == _row_index) {
n = p.size() - _vnotebook.get_current_page () - 1;
if (_arrangement == LEFT_TO_BOTTOM) {
n = p.size() - _vnotebook.get_current_page () - 1;
} else {
n = _vnotebook.get_current_page ();
}
} else {
n = _hnotebook.get_current_page ();
}