40 setText(QApplication::translate(
"VuoEditorWindow",
"Cable Connection"));
41 this->window = window;
47 this->cableInProgress = cableInProgress;
48 this->displacedCable = displacedCable;
49 this->fromPortForAddedCable = NULL;
50 this->toPortForAddedCable = NULL;
51 this->addedNode = NULL;
52 this->inputEditorManager = inputEditorManager;
55 VuoPort *internalPortToUnpublish = (portToUnpublish? portToUnpublish->
getBase() : NULL);
92 updatedConstantForPort[toPort] = (currentRunningValue? json_object_to_json_string_ext(currentRunningValue, JSON_C_TO_STRING_PLAIN) :
93 revertedConstantForPort[toPort]);
103 revertedFromPortForCable[cableInProgress] = NULL;
104 revertedToPortForCable[cableInProgress] = NULL;
108 updatedToPortForCable[cableInProgress] = targetPort->
getBase();
114 revertedToPortForCable[displacedCable] = displacedCable->
getBase()->
getToPort();
116 updatedFromPortForCable[displacedCable] = NULL;
117 updatedToPortForCable[displacedCable] = NULL;
125 revertedFromPortForCable[cableInProgress] = NULL;
126 revertedToPortForCable[cableInProgress] = NULL;
128 updatedFromPortForCable[cableInProgress] = targetPort->
getBase();
129 updatedToPortForCable[cableInProgress] = cableInProgress->
getBase()->
getToPort();
139 bool mustReconstructRevertedSnapshot = ((currentFromPortForCableInProgress != revertedFromPortForCable[cableInProgress]) ||
140 (currentToPortForCableInProgress != revertedToPortForCable[cableInProgress]));
142 if (mustReconstructRevertedSnapshot)
144 VuoCommandCommon::updateCable(cableInProgress, revertedFromPortForCable[cableInProgress], revertedToPortForCable[cableInProgress], composition,
true);
145 cableInProgress->getBase()->getCompiler()->setAlwaysEventOnly(cableInProgress->getPreviouslyAlwaysEventOnly());
150 if (mustReconstructRevertedSnapshot)
152 cableInProgress->getBase()->getCompiler()->setAlwaysEventOnly(currentAlwaysEventOnlyStatusForCableInProgress);
162 (previousInputPort != targetPort->
getBase()))
171 addedNode = makeListNode;
174 toPortForAddedCable = previousInputPort;
181 inventorySharedValueToBackpropagate();
183 this->operationInvolvesGenericPort = modifiedComponentsIncludeGenericPorts();
190 if (internalPortToUnpublish)
192 bool unpublishIsolatedExternalPorts =
false;
198 VuoCommandCommon::updateCable(cableInProgress, updatedFromPortForCable[cableInProgress], updatedToPortForCable[cableInProgress], composition);
212 for (map<VuoPort *, string>::iterator i = updatedConstantForPort.begin(); i != updatedConstantForPort.end(); ++i)
216 if (revertedConstantForPort[toPort] != updatedConstantForPort[toPort])