- PortMatrixNode const n = position_to_node (x, y);
- if (n.row.bundle && n.column.bundle) {
- PortMatrixNode::State const s = get_association (n);
- set_association (n, toggle_state (s));
+ if (Keyboard::modifier_state_equals (s, Keyboard::PrimaryModifier)) {
+ /* associate/disassociate things diagonally down and right until we run out */
+ PortMatrixNode::State s = (PortMatrixNode::State) 0;
+ while (1) {
+ PortMatrixNode const n = position_to_node (x, y);
+ if (n.row.bundle && n.column.bundle) {
+ if (s == (PortMatrixNode::State) 0) {
+ s = get_association (n);
+ }
+ set_association (n, toggle_state (s));
+ } else {
+ break;
+ }
+ x += grid_spacing ();
+ y += grid_spacing ();
+ }
+
+ } else {
+
+ PortMatrixNode const n = position_to_node (x, y);
+ if (n.row.bundle && n.column.bundle) {
+ PortMatrixNode::State const s = get_association (n);
+ set_association (n, toggle_state (s));
+ }