Fix subtle bug whe clicking around oddly

This commit is contained in:
Matthias 2023-05-06 15:10:35 +02:00
parent 49f88c28fc
commit f9e9b9bfda

View File

@ -147,7 +147,7 @@ import PlotIndicator from '@/components/charts/PlotIndicator.vue';
import { showAlert } from '@/stores/alerts';
import AddIcon from 'vue-material-design-icons/PlusBoxOutline.vue';
import { computed, ref, onMounted, onUnmounted } from 'vue';
import { computed, ref, onMounted, onUnmounted, watch } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
import { usePlotConfigStore } from '@/stores/plotConfig';
import { deepClone } from '@/shared/deepClone';
@ -311,6 +311,11 @@ function savePlotConfig() {
plotStore.saveCustomPlotConfig(plotConfigNameLoc.value, plotStore.editablePlotConfig);
}
watch(selSubPlot, () => {
// Deselect Indicator when switching selected plot
selIndicatorName.value = '';
});
onMounted(() => {
// Deep clone and assign to editable
plotStore.editablePlotConfig = deepClone(plotStore.plotConfig);