Skip to content

Commit

Permalink
Merge pull request #1679 from NicoPennec/main
Browse files Browse the repository at this point in the history
Various fixes
  • Loading branch information
frankrousseau authored Jan 23, 2025
2 parents b09bccc + 956d7c9 commit 904486d
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/components/mixins/entity_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@ export const entityListMixin = {
},

startBrowsing(event) {
if (event.target.tagName === 'INPUT') return

document.body.style.cursor = 'grabbing'
this.isBrowsingX = true
this.isBrowsingY = true
Expand Down
5 changes: 4 additions & 1 deletion src/store/modules/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,10 @@ const mutations = {
},

[CLEAR_SELECTED_TASKS](state, validationInfo) {
if (tasksStore.state.nbSelectedTasks > 0) {
if (
tasksStore.state.nbSelectedValidations > 0 ||
tasksStore.state.nbSelectedTasks > 0
) {
const tmpGrid = JSON.parse(JSON.stringify(state.assetSelectionGrid))
state.assetSelectionGrid = clearSelectionGrid(tmpGrid)
}
Expand Down
5 changes: 4 additions & 1 deletion src/store/modules/edits.js
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,10 @@ const mutations = {
},

[CLEAR_SELECTED_TASKS](state, validationInfo) {
if (tasksStore.state.nbSelectedTasks > 0) {
if (
tasksStore.state.nbSelectedValidations > 0 ||
tasksStore.state.nbSelectedTasks > 0
) {
const tmpGrid = JSON.parse(JSON.stringify(state.editSelectionGrid))
state.editSelectionGrid = clearSelectionGrid(tmpGrid)
}
Expand Down
5 changes: 4 additions & 1 deletion src/store/modules/episodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,10 @@ const mutations = {
},

[CLEAR_SELECTED_TASKS](state, validationInfo) {
if (taskStore.state.nbSelectedTasks > 0) {
if (
taskStore.state.nbSelectedValidations > 0 ||
taskStore.state.nbSelectedTasks > 0
) {
const tmpGrid = JSON.parse(JSON.stringify(state.episodeSelectionGrid))
state.episodeSelectionGrid = clearSelectionGrid(tmpGrid)
}
Expand Down
5 changes: 4 additions & 1 deletion src/store/modules/people.js
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,10 @@ const mutations = {
},

[CLEAR_SELECTED_TASKS](state, validationInfo) {
if (taskStore.state.nbSelectedTasks > 0) {
if (
taskStore.state.nbSelectedValidations > 0 ||
taskStore.state.nbSelectedTasks > 0
) {
state.personTaskSelectionGrid = clearSelectionGrid(
state.personTaskSelectionGrid
)
Expand Down
5 changes: 4 additions & 1 deletion src/store/modules/sequences.js
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,10 @@ const mutations = {
},

[CLEAR_SELECTED_TASKS](state, validationInfo) {
if (taskStore.state.nbSelectedTasks > 0) {
if (
taskStore.state.nbSelectedValidations > 0 ||
taskStore.state.nbSelectedTasks > 0
) {
const tmpGrid = JSON.parse(JSON.stringify(state.sequenceSelectionGrid))
state.sequenceSelectionGrid = clearSelectionGrid(tmpGrid)
}
Expand Down
5 changes: 4 additions & 1 deletion src/store/modules/shots.js
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,10 @@ const mutations = {
},

[CLEAR_SELECTED_TASKS](state, validationInfo) {
if (tasksStore.state.nbSelectedTasks > 0) {
if (
tasksStore.state.nbSelectedValidations > 0 ||
tasksStore.state.nbSelectedTasks > 0
) {
const tmpGrid = JSON.parse(JSON.stringify(state.shotSelectionGrid))
state.shotSelectionGrid = clearSelectionGrid(tmpGrid)
}
Expand Down
2 changes: 2 additions & 0 deletions src/store/modules/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,8 @@ const mutations = {
if (state.nbSelectedTasks > 0) {
state.selectedTasks = new Map()
state.nbSelectedTasks = 0
}
if (state.nbSelectedValidations > 0) {
state.selectedValidations = new Map()
state.nbSelectedValidations = 0
}
Expand Down
5 changes: 4 additions & 1 deletion src/store/modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,11 @@ const mutations = {
)
if (filterGroup) {
Object.assign(filterGroup, userFilterGroup)
// update the shared status of filters in group
state.userFilters?.[typeName]?.[projectId].forEach(filter => {
filter.is_shared = userFilterGroup.is_shared
if (filter.search_filter_group_id === userFilterGroup.id) {
filter.is_shared = userFilterGroup.is_shared
}
})
}
})
Expand Down

0 comments on commit 904486d

Please sign in to comment.