editor store: only reset dependent selections if selection actually changes

This commit is contained in:
Seth Ladygo
2019-05-18 10:41:22 -07:00
parent cf20ec15b2
commit 634bf0bfb4

View File

@ -143,18 +143,24 @@ export const store = new Vuex.Store({
//
selectSection(state, id) {
state.selectedSectionID = id
state.selectedModelID = null
state.selectedMaterialID = null
if (state.selectedSectionID !== id) {
state.selectedSectionID = id
state.selectedModelID = null
state.selectedMaterialID = null
}
},
selectModel(state, id) {
state.selectedModelID = id
state.selectedMaterialID = null
if (state.selectedModelID !== id) {
state.selectedModelID = id
state.selectedMaterialID = null
}
},
selectMaterial(state, id) {
state.selectedMaterialID = id
if (state.selectedMaterialID !== id) {
state.selectedMaterialID = id
}
},
//