Skip to content

Commit

Permalink
fix(editor): Fix merge node connectors (#5364)
Browse files Browse the repository at this point in the history
* fix(editor): Fix merge node connectors

* Set `stateIsDirty` from `EVENT_CONNECTION` hook
  • Loading branch information
OlegIvaniv authored Feb 6, 2023
1 parent 8d9b64e commit 20356ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/editor-ui/src/stores/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
3 changes: 3 additions & 0 deletions packages/editor-ui/src/views/NodeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,7 @@ export default mixins(
this.connectTwoNodes(sourceNodeName, outputIndex, this.pullConnActiveNodeName, 0);
this.pullConnActiveNodeName = null;
this.dropPrevented = true;
}
return;
}
Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit 20356ba

Please sign in to comment.