diff options
author | Carl Hetherington <carl@carlh.net> | 2009-11-14 15:12:13 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-11-14 15:12:13 +0000 |
commit | d77911a7748d179748accd28325c08b12f9388d9 (patch) | |
tree | 1ec1d7439ffb74409d132d2b13cfac8016269e63 | |
parent | 9dbecd0fa1a977da1643977487a5485f4bf74267 (diff) |
Fix some uninitialised variables in the port matrix code.
git-svn-id: svn://localhost/ardour2/branches/3.0@6085 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/port_matrix_body.cc | 12 | ||||
-rw-r--r-- | gtk2_ardour/port_matrix_body.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc index b3398d850f..6fcc773253 100644 --- a/gtk2_ardour/port_matrix_body.cc +++ b/gtk2_ardour/port_matrix_body.cc @@ -30,9 +30,12 @@ using namespace std; PortMatrixBody::PortMatrixBody (PortMatrix* p) : _matrix (p), + _alloc_width (0), + _alloc_height (0), _xoffset (0), _yoffset (0), - _mouse_over_grid (false) + _mouse_over_grid (false), + _ignore_component_size_changed (false) { _column_labels = new PortMatrixColumnLabels (p, this); _row_labels = new PortMatrixRowLabels (p, this); @@ -265,7 +268,10 @@ PortMatrixBody::setup () _grid->setup (); set_mouseover (PortMatrixNode ()); + + _ignore_component_size_changed = true; compute_rectangles (); + _ignore_component_size_changed = false; } uint32_t @@ -470,6 +476,10 @@ PortMatrixBody::set_cairo_clip (cairo_t* cr, Gdk::Rectangle const & r) const void PortMatrixBody::component_size_changed () { + if (_ignore_component_size_changed) { + return; + } + compute_rectangles (); _matrix->setup_scrollbars (); } diff --git a/gtk2_ardour/port_matrix_body.h b/gtk2_ardour/port_matrix_body.h index 9195608d28..341957a38a 100644 --- a/gtk2_ardour/port_matrix_body.h +++ b/gtk2_ardour/port_matrix_body.h @@ -96,6 +96,7 @@ private: PortMatrixNode _mouseover; bool _mouse_over_grid; + bool _ignore_component_size_changed; std::list<sigc::connection> _bundle_connections; }; |