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

Method appendDisconnectActions

src/app/ModuleWidget.cpp:789–801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

787}
788
789void ModuleWidget::appendDisconnectActions(history::ComplexAction* complexAction) {
790 for (PortWidget* pw : getPorts()) {
791 for (CableWidget* cw : APP->scene->rack->getCompleteCablesOnPort(pw)) {
792 // history::CableRemove
793 history::CableRemove* h = new history::CableRemove;
794 h->setCable(cw);
795 complexAction->push(h);
796 // Delete cable
797 APP->scene->rack->removeCable(cw);
798 delete cw;
799 }
800 };
801}
802
803void ModuleWidget::disconnectAction() {
804 history::ComplexAction* complexAction = new history::ComplexAction;

Callers 2

deleteSelectionActionMethod · 0.80

Calls 4

setCableMethod · 0.45
pushMethod · 0.45
removeCableMethod · 0.45

Tested by

no test coverage detected