diff options
author | Carl Hetherington <carl@carlh.net> | 2009-07-19 21:23:16 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-07-19 21:23:16 +0000 |
commit | 82f31ffc796146389332295b51f27254e945fe01 (patch) | |
tree | fb6da71a04903a597d8f3fe7837df231fe73cc3c /gtk2_ardour/port_matrix_grid.cc | |
parent | 1efee9951a2c4c6b2d28aa9b9854d65dc5e73d63 (diff) |
No highlighting at all when mouse is over a collapsed group. Fix crash on clicking in a collapsed group.
git-svn-id: svn://localhost/ardour2/branches/3.0@5388 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_grid.cc')
-rw-r--r-- | gtk2_ardour/port_matrix_grid.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gtk2_ardour/port_matrix_grid.cc b/gtk2_ardour/port_matrix_grid.cc index 50740cae63..4682f6f3c3 100644 --- a/gtk2_ardour/port_matrix_grid.cc +++ b/gtk2_ardour/port_matrix_grid.cc @@ -420,9 +420,10 @@ PortMatrixGrid::button_release (double x, double y, int b, uint32_t t) } else { PortMatrixNode const n = position_to_node (x / grid_spacing(), y / grid_spacing()); - PortMatrixNode::State const s = get_association (n); - - set_association (n, toggle_state (s)); + if (n.row.bundle && n.column.bundle) { + PortMatrixNode::State const s = get_association (n); + set_association (n, toggle_state (s)); + } } require_render (); @@ -619,9 +620,15 @@ PortMatrixGrid::nodes_on_line (int x0, int y0, int x1, int y1) const for (int x = x0; x <= x1; ++x) { if (steep) { - p.push_back (position_to_node (y, x)); + PortMatrixNode n = position_to_node (y, x); + if (n.row.bundle && n.column.bundle) { + p.push_back (n); + } } else { - p.push_back (position_to_node (x, y)); + PortMatrixNode n = position_to_node (x, y); + if (n.row.bundle && n.column.bundle) { + p.push_back (n); + } } err += derr; |