| 86 | CableWidget* cw; |
| 87 | |
| 88 | void onButton(const ButtonEvent& e) override { |
| 89 | OpaqueWidget::onButton(e); |
| 90 | if (disabled) |
| 91 | return; |
| 92 | if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT && (e.mods & RACK_MOD_MASK) == 0) { |
| 93 | // Set PortWidget::onDragStart overrides |
| 94 | pw->internal->overrideCloneCw = cw; |
| 95 | |
| 96 | // Pretend the PortWidget was clicked |
| 97 | e.consume(pw); |
| 98 | // Deletes `this` |
| 99 | doAction(); |
| 100 | } |
| 101 | } |
| 102 | }; |
| 103 | |
| 104 |