MCPcopy Create free account
hub / github.com/VCVRack/Rack / updateCable

Method updateCable

src/app/CableWidget.cpp:168–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166
167
168void CableWidget::updateCable() {
169 if (cable) {
170 APP->engine->removeCable(cable);
171 delete cable;
172 cable = NULL;
173 }
174 if (inputPort && outputPort) {
175 cable = new engine::Cable;
176 cable->id = internal->cableId;
177 cable->inputModule = inputPort->module;
178 cable->inputId = inputPort->portId;
179 cable->outputModule = outputPort->module;
180 cable->outputId = outputPort->portId;
181 APP->engine->addCable(cable);
182 internal->cableId = cable->id;
183 }
184}
185
186
187void CableWidget::setCable(engine::Cable* cable) {

Callers 2

onDragStartMethod · 0.80
onDragDropMethod · 0.80

Calls 2

removeCableMethod · 0.45
addCableMethod · 0.45

Tested by

no test coverage detected