cateditor: fix setting model name
This commit is contained in:
@ -158,8 +158,15 @@ export const store = new Vuex.Store({
|
||||
}
|
||||
},
|
||||
|
||||
setModelName(state, { model, name }) {
|
||||
model.name = name
|
||||
setModelName(state, { section, model, name }) {
|
||||
let catSection = state.catalog.sections.find(s => s.id === section.id)
|
||||
for (let catPage of catSection.pages) {
|
||||
for (let catModel of catPage) {
|
||||
if (catModel.model === model.model) {
|
||||
catModel.name = name
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
addMaterialsToLibrary(state, materials) {
|
||||
|
||||
Reference in New Issue
Block a user