summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-11-01 21:17:05 +0000
committerCarl Hetherington <carl@carlh.net>2011-11-01 21:17:05 +0000
commitcca8b8cda0d25459019bb10a59616fec108b825e (patch)
tree6763c9caa06d224d30443b80f8578537b3909cdb /gtk2_ardour/port_matrix.cc
parentddff1489f26a753efc3cbdb35fc4c1d19b17c53e (diff)
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
Diffstat (limited to 'gtk2_ardour/port_matrix.cc')
-rw-r--r--gtk2_ardour/port_matrix.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 8d4a8e5696..7125780ccf 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -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 ();
}