No highlighting at all when mouse is over a collapsed group. Fix crash on clicking...
authorCarl Hetherington <carl@carlh.net>
Sun, 19 Jul 2009 21:23:16 +0000 (21:23 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 19 Jul 2009 21:23:16 +0000 (21:23 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@5388 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/port_matrix_column_labels.cc
gtk2_ardour/port_matrix_grid.cc
gtk2_ardour/port_matrix_row_labels.cc

index 1679b321df0a0d07980e07c6afc72b55ec039b07..ba27120b57e27d75136ac0630fa6699105ca69a4 100644 (file)
@@ -270,7 +270,7 @@ void
 PortMatrixColumnLabels::mouseover_changed (PortMatrixNode const &)
 {
        clear_channel_highlights ();
-       if (_body->mouseover().column.bundle) {
+       if (_body->mouseover().column.bundle && _body->mouseover().row.bundle) {
                add_channel_highlight (_body->mouseover().column);
        }
 }
index 50740cae63931f214f5f173d7583b6f4e3f9f5a7..4682f6f3c3fd86b0e8273d833591747f6b91a7ab 100644 (file)
@@ -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;
index 7b4383155d2bc2a925d97c17b0e38a17df37b447..8d7410d319fee99eda20fc68f5910b69a5f8b961 100644 (file)
@@ -364,7 +364,7 @@ void
 PortMatrixRowLabels::mouseover_changed (PortMatrixNode const &)
 {
        clear_channel_highlights ();
-       if (_body->mouseover().row.bundle) {
+       if (_body->mouseover().column.bundle && _body->mouseover().row.bundle) {
                add_channel_highlight (_body->mouseover().row);
        }
 }