# HG changeset patch # User Markus Kottlaender # Date 1543389083 -3600 # Node ID 801ae5f4bc5bc721c3dac819be268fef3c287c91 # Parent 69e0b75c0cc860994f1d8d5409d36dce0cc92c14 fixed bug when changing additional survey in profile dialog diff -r 69e0b75c0cc8 -r 801ae5f4bc5b client/src/components/map/fairway/Fairwayprofile.vue --- a/client/src/components/map/fairway/Fairwayprofile.vue Tue Nov 27 17:24:48 2018 +0100 +++ b/client/src/components/map/fairway/Fairwayprofile.vue Wed Nov 28 08:11:23 2018 +0100 @@ -133,7 +133,7 @@ return this.$store.getters["fairwayprofile/additionalSurvey"]; }, set(value) { - this.$store.commit("fairwayprofile/setAdditionalSurvey", value); + this.$store.commit("fairwayprofile/additionalSurvey", value); this.selectAdditionalSurveyData(); } }, diff -r 69e0b75c0cc8 -r 801ae5f4bc5b client/src/components/map/fairway/Profiles.vue --- a/client/src/components/map/fairway/Profiles.vue Tue Nov 27 17:24:48 2018 +0100 +++ b/client/src/components/map/fairway/Profiles.vue Wed Nov 28 08:11:23 2018 +0100 @@ -202,7 +202,7 @@ return this.$store.state.fairwayprofile.additionalSurvey; }, set(survey) { - this.$store.commit("fairwayprofile/setAdditionalSurvey", survey); + this.$store.commit("fairwayprofile/additionalSurvey", survey); } }, additionalSurveys() { @@ -234,7 +234,10 @@ this.selectedBottleneck + " (" + new Date().toISOString() + ")"; }, selectedSurvey(survey) { - if (survey) this.$store.dispatch("fairwayprofile/loadProfile", survey); + this.$store.commit("fairwayprofile/additionalSurvey", null); + if (survey) { + this.$store.dispatch("fairwayprofile/loadProfile", survey); + } }, additionalSurvey(survey) { if (survey) this.$store.dispatch("fairwayprofile/loadProfile", survey); diff -r 69e0b75c0cc8 -r 801ae5f4bc5b client/src/store/fairway.js --- a/client/src/store/fairway.js Tue Nov 27 17:24:48 2018 +0100 +++ b/client/src/store/fairway.js Wed Nov 28 08:11:23 2018 +0100 @@ -27,7 +27,7 @@ // initial state const init = () => { return { - additionalSurvey: "", + additionalSurvey: null, totalLength: 0, minAlt: 0, maxAlt: 0, @@ -55,7 +55,7 @@ } }, mutations: { - setAdditionalSurvey: (state, additionalSurvey) => { + additionalSurvey: (state, additionalSurvey) => { state.additionalSurvey = additionalSurvey; }, setSelectedWaterLevel: (state, level) => { @@ -93,7 +93,7 @@ state.fairwayCoordinates = coordinates; }, clearCurrentProfile: state => { - state.additionalSurvey = ""; + state.additionalSurvey = null; state.currentProfile = {}; state.minAlt = null; state.maxAlt = null;