diff --git a/src/components/sentence/SentenceCard.vue b/src/components/sentence/SentenceCard.vue index 6377735a..fe988440 100644 --- a/src/components/sentence/SentenceCard.vue +++ b/src/components/sentence/SentenceCard.vue @@ -534,6 +534,7 @@ export default defineComponent({ this.sentenceBus.emit('action:saved', { userId: this.openTabUser, }); + this.removePendingModification(`${this.sentence.sent_id}_${this.openTabUser}`); this.reloadCommits += 1; if (this.sentenceData.conlls[changedConllUser]) { // the user already had a tree @@ -552,7 +553,6 @@ export default defineComponent({ this.openTabUser = changedConllUser; this.exportedConll = exportedConll; } - this.removePendingModification(`${this.sentence.sent_id}_${this.openTabUser}`); notifyMessage({ position: 'top', message: 'Saved on the server', icon: 'save' }); } }) diff --git a/src/components/sentence/VueDepTree.vue b/src/components/sentence/VueDepTree.vue index 1a219aee..47224d08 100644 --- a/src/components/sentence/VueDepTree.vue +++ b/src/components/sentence/VueDepTree.vue @@ -214,7 +214,7 @@ export default defineComponent({ this.statusChangeHandler(); }, methods: { - ...mapActions(useGrewSearchStore, ['addPendingModification']), + ...mapActions(useGrewSearchStore, ['addPendingModification', 'removePendingModification']), svgClickHandler(e: svgClickEvent_t) { const clickedId = e.detail.clicked; const clickedToken = { ...this.sentenceSVG.treeJson.nodesJson[clickedId] }; @@ -284,6 +284,11 @@ export default defineComponent({ `${ this.reactiveSentencesObj[this.treeUserId].state.metaJson.sent_id }_${this.reactiveSentencesObj[this.treeUserId].state.metaJson.user_id }`, this.reactiveSentencesObj[this.treeUserId].exportConll() ); + else { + this.removePendingModification(`${ + this.reactiveSentencesObj[this.treeUserId].state.metaJson.sent_id }_${this.reactiveSentencesObj[this.treeUserId].state.metaJson.user_id }` + ); + } this.$emit('statusChanged', { canUndo,