Skip to content

Commit

Permalink
Fix for ignore submatrices randomize config.
Browse files Browse the repository at this point in the history
  • Loading branch information
Smoren committed May 6, 2024
1 parent cf7d988 commit 66264ae
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { computed, type Ref, ref } from "vue";
import { computed, type Ref, ref, watch } from "vue";
import { useConfigStore } from "@/store/config";
import { useSimulationStore } from "@/store/simulation";
import ConfigSection from '@/components/config-editor/components/containers/config-section.vue';
Expand All @@ -10,7 +10,7 @@ import Flag from "@/components/config-editor/components/inputs/flag.vue";
import InputHeader from "@/components/config-editor/components/base/input-header.vue";
const configStore = useConfigStore();
const { randomTypesConfig } = configStore;
const { randomTypesConfig, typesConfig } = configStore;
const {
clearAtoms,
Expand All @@ -25,6 +25,12 @@ const needRefill = computed((): boolean => {
const useIgnoreSubMatricesBoundaryIndex: Ref<boolean> = ref(false);
const ignoreSubMatricesBoundaryIndex: Ref<number | undefined> = ref(3);
watch(useIgnoreSubMatricesBoundaryIndex, () => {
if (useIgnoreSubMatricesBoundaryIndex.value) {
randomTypesConfig.TYPES_COUNT = typesConfig.FREQUENCIES.length;
}
});
const randomizeTypesConfig = () => {
if (!confirm('Are you sure?')) {
return;
Expand Down

0 comments on commit 66264ae

Please sign in to comment.