mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08:00
⚡ Fixed dirty state not being triggered with node connection
This commit is contained in:
parent
4c04cc015d
commit
d1f9cef891
|
@ -160,6 +160,7 @@ export const store = new Vuex.Store({
|
|||
|
||||
// Selected Nodes
|
||||
addSelectedNode (state, node: INodeUi) {
|
||||
state.stateIsDirty = true;
|
||||
state.selectedNodes.push(node);
|
||||
},
|
||||
removeNodeFromSelection (state, node: INodeUi) {
|
||||
|
@ -189,7 +190,7 @@ export const store = new Vuex.Store({
|
|||
return;
|
||||
}
|
||||
|
||||
if (data.setStateDirty) {
|
||||
if (data.setStateDirty === true) {
|
||||
state.stateIsDirty = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1239,7 +1239,6 @@ export default mixins(
|
|||
if (![null, undefined].includes(inputNameOverlay)) {
|
||||
inputNameOverlay.setVisible(false);
|
||||
}
|
||||
|
||||
this.$store.commit('addConnection', {
|
||||
connection: [
|
||||
{
|
||||
|
@ -1253,6 +1252,7 @@ export default mixins(
|
|||
index: targetInfo.index,
|
||||
},
|
||||
],
|
||||
setStateDirty: true,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1388,11 +1388,10 @@ export default mixins(
|
|||
detachable: !this.isReadOnly,
|
||||
});
|
||||
} else {
|
||||
// @ts-ignore
|
||||
connection.setStateDirty = false;
|
||||
let connectionProperties = {connection, setStateDirty: false};
|
||||
// When nodes get connected it gets saved automatically to the storage
|
||||
// so if we do not connect we have to save the connection manually
|
||||
this.$store.commit('addConnection', { connection });
|
||||
this.$store.commit('addConnection', connectionProperties);
|
||||
}
|
||||
},
|
||||
__removeConnection (connection: [IConnection, IConnection], removeVisualConnection = false) {
|
||||
|
|
Loading…
Reference in a new issue