| 166 | |
| 167 | |
| 168 | void 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 | |
| 187 | void CableWidget::setCable(engine::Cable* cable) { |
no test coverage detected