* bugfix: invisible midi ports in port matrix shown
authorHans Baier <hansfbaier@googlemail.com>
Sat, 5 Apr 2008 03:49:31 +0000 (03:49 +0000)
committerHans Baier <hansfbaier@googlemail.com>
Sat, 5 Apr 2008 03:49:31 +0000 (03:49 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@3218 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/port_matrix.cc

index 19c0dc9d7fd95c939be72f144626ef4cd537307a..f47a4ff191a8b1c64467d3c9fd6e157da79e9250 100644 (file)
@@ -509,20 +509,22 @@ PortMatrix::setup ()
        /* Checkbutton tables and visibility checkbuttons */
        int n = 0;
        for (PortGroupList::iterator i = _port_group_list.begin(); i != _port_group_list.end(); ++i) {
-               PortGroupUI* t = new PortGroupUI (*this, **i);
+               if ((*i)->visible) {
+                       PortGroupUI* t = new PortGroupUI (*this, **i);
 
-               /* XXX: this is a bit of a hack; should probably use a configurable colour here */
-               Gdk::Color alt_bg = get_style()->get_bg (Gtk::STATE_NORMAL);
-               alt_bg.set_rgb (alt_bg.get_red() + 4096, alt_bg.get_green() + 4096, alt_bg.get_blue () + 4096);
-               if ((n % 2) == 0) {
-                       t->get_table().modify_bg (Gtk::STATE_NORMAL, alt_bg);
-               }
+                       /* XXX: this is a bit of a hack; should probably use a configurable colour here */
+                       Gdk::Color alt_bg = get_style()->get_bg (Gtk::STATE_NORMAL);
+                       alt_bg.set_rgb (alt_bg.get_red() + 4096, alt_bg.get_green() + 4096, alt_bg.get_blue () + 4096);
+                       if ((n % 2) == 0) {
+                               t->get_table().modify_bg (Gtk::STATE_NORMAL, alt_bg);
+                       }
 
-               _port_group_ui.push_back (t);
-               _port_group_hbox.pack_start (t->get_table(), false, false);
+                       _port_group_ui.push_back (t);
+                       _port_group_hbox.pack_start (t->get_table(), false, false);
 
-               _visibility_checkbutton_box.pack_start (t->get_visibility_checkbutton(), false, false);
-               ++n;
+                       _visibility_checkbutton_box.pack_start (t->get_visibility_checkbutton(), false, false);
+                       ++n;
+               }
        }
 
        show_all ();