fix(editor): Fix merge node connectors (#5364)

* fix(editor): Fix merge node connectors

* Set `stateIsDirty` from `EVENT_CONNECTION` hook
This commit is contained in:
OlegIvaniv 2023-02-06 09:49:18 +01:00 committed by GitHub
parent 8d9b64e26e
commit 20356ba8c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -538,7 +538,6 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
// TODO: Check if there is an error or whatever that is supposed to be returned
return;
}
const sourceData: IConnection = data.connection[0];
const destinationData: IConnection = data.connection[1];

View file

@ -2088,6 +2088,7 @@ export default mixins(
this.connectTwoNodes(sourceNodeName, outputIndex, this.pullConnActiveNodeName, 0);
this.pullConnActiveNodeName = null;
this.dropPrevented = true;
}
return;
}
@ -2160,6 +2161,8 @@ export default mixins(
];
this.dropPrevented = true;
this.workflowsStore.addConnection({ connection: connectionData });
this.uiStore.stateIsDirty = true;
if (!this.suspendRecordingDetachedConnections) {
this.historyStore.pushCommandToUndo(new AddConnectionCommand(connectionData));
}