summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-07-18 03:17:47 +0000
committerCarl Hetherington <carl@carlh.net>2009-07-18 03:17:47 +0000
commit2e7eeef44868d84f51e0d4b54d31e39d7cf26918 (patch)
treef186d78b5691449562cebb3a4e2dd24b2bb53204 /gtk2_ardour/port_matrix.cc
parentfea3992f29d3a3d419529a99692b46dd9dafee58 (diff)
Better fix for non-rearrangement after open for the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@5377 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix.cc')
-rw-r--r--gtk2_ardour/port_matrix.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 820920ed14..a35ec2f046 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -51,7 +51,7 @@ PortMatrix::PortMatrix (ARDOUR::Session& session, ARDOUR::DataType type)
_min_height_divisor (1),
_show_only_bundles (false),
_inhibit_toggle_show_only_bundles (false),
- _first_setup (true)
+ _realized (false)
{
_body = new PortMatrixBody (this);
@@ -115,7 +115,7 @@ PortMatrix::routes_changed ()
void
PortMatrix::setup ()
{
- if (_first_setup) {
+ if (!_realized) {
select_arrangement ();
}
@@ -123,8 +123,6 @@ PortMatrix::setup ()
setup_scrollbars ();
queue_draw ();
- _first_setup = false;
-
show_all ();
}
@@ -461,3 +459,17 @@ PortMatrix::max_size () const
return m;
}
+
+void
+PortMatrix::on_realize ()
+{
+ Widget::on_realize ();
+ _realized = true;
+}
+
+void
+PortMatrix::on_unrealize ()
+{
+ Widget::on_unrealize ();
+ _realized = false;
+}