summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_body.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-12-07 18:35:42 +0000
committerCarl Hetherington <carl@carlh.net>2009-12-07 18:35:42 +0000
commitdc86434283718b7c4a4ed6af52a950e6cfc5e86f (patch)
treefbb1ea6c2fda853e4201ca783a7d76f29416f3dc /gtk2_ardour/port_matrix_body.cc
parent71f1b360a0c0ddeb9b7eb47f01dfbd87423b314a (diff)
Redraw the matrix correctly when available ports change in the currently visible tab.
git-svn-id: svn://localhost/ardour2/branches/3.0@6322 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_body.cc')
-rw-r--r--gtk2_ardour/port_matrix_body.cc32
1 files changed, 18 insertions, 14 deletions
diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc
index 72da040ed7..847ee2f2ca 100644
--- a/gtk2_ardour/port_matrix_body.cc
+++ b/gtk2_ardour/port_matrix_body.cc
@@ -253,22 +253,26 @@ PortMatrixBody::setup ()
/* Connect to bundles so that we find out when their names change */
- PortGroup::BundleList r = _matrix->visible_rows()->bundles ();
- for (PortGroup::BundleList::iterator i = r.begin(); i != r.end(); ++i) {
-
- _bundle_connections.push_back (
- i->bundle->Changed.connect (sigc::hide (sigc::mem_fun (*this, &PortMatrixBody::rebuild_and_draw_row_labels)))
- );
-
+ if (_matrix->visible_rows()) {
+ PortGroup::BundleList r = _matrix->visible_rows()->bundles ();
+ for (PortGroup::BundleList::iterator i = r.begin(); i != r.end(); ++i) {
+
+ _bundle_connections.push_back (
+ i->bundle->Changed.connect (sigc::hide (sigc::mem_fun (*this, &PortMatrixBody::rebuild_and_draw_row_labels)))
+ );
+
+ }
}
-
- PortGroup::BundleList c = _matrix->visible_columns()->bundles ();
- for (PortGroup::BundleList::iterator i = c.begin(); i != c.end(); ++i) {
- _bundle_connections.push_back (
- i->bundle->Changed.connect (sigc::hide (sigc::mem_fun (*this, &PortMatrixBody::rebuild_and_draw_column_labels)))
- );
+
+ if (_matrix->visible_columns()) {
+ PortGroup::BundleList c = _matrix->visible_columns()->bundles ();
+ for (PortGroup::BundleList::iterator i = c.begin(); i != c.end(); ++i) {
+ _bundle_connections.push_back (
+ i->bundle->Changed.connect (sigc::hide (sigc::mem_fun (*this, &PortMatrixBody::rebuild_and_draw_column_labels)))
+ );
+ }
}
-
+
for (list<PortMatrixComponent*>::iterator i = _components.begin(); i != _components.end(); ++i) {
(*i)->setup ();
}