| 200 | size_t colorId; |
| 201 | |
| 202 | void onButton(const ButtonEvent& e) override { |
| 203 | OpaqueWidget::onButton(e); |
| 204 | if (disabled) |
| 205 | return; |
| 206 | if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT && (e.mods & RACK_MOD_MASK) == 0) { |
| 207 | APP->scene->rack->setNextCableColorId(colorId); |
| 208 | // Set PortWidget::onDragStart overrides |
| 209 | pw->internal->overrideCreateCable = true; |
| 210 | |
| 211 | // Pretend the PortWidget was clicked |
| 212 | e.consume(pw); |
| 213 | // Deletes `this` |
| 214 | doAction(); |
| 215 | } |
| 216 | } |
| 217 | }; |
| 218 | |
| 219 |
nothing calls this directly
no test coverage detected