From 549a8cb88b93e60d8dc412ee29fd52508ce07d2d Mon Sep 17 00:00:00 2001 From: Hans Baier Date: Sat, 5 Apr 2008 03:49:31 +0000 Subject: [PATCH] * bugfix: invisible midi ports in port matrix shown git-svn-id: svn://localhost/ardour2/branches/3.0@3218 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/port_matrix.cc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc index 19c0dc9d7f..f47a4ff191 100644 --- a/gtk2_ardour/port_matrix.cc +++ b/gtk2_ardour/port_matrix.cc @@ -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 ();