mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-25 12:22:49 +02:00
Fix restoration of disabled image tags
Fix the restoration inactive image tags.
This commit is contained in:
parent
8bdcea202f
commit
3c5ffbdaaa
@ -158,7 +158,7 @@ async function loadModifiers() {
|
||||
document.dispatchEvent(new Event('loadImageModifiers'))
|
||||
}
|
||||
|
||||
function refreshModifiersState(newTags) {
|
||||
function refreshModifiersState(newTags, inactiveTags) {
|
||||
// clear existing modifiers
|
||||
document.querySelector('#editor-modifiers').querySelectorAll('.modifier-card').forEach(modifierCard => {
|
||||
const modifierName = modifierCard.querySelector('.modifier-card-label p').dataset.fullName // pick the full modifier name
|
||||
@ -212,7 +212,7 @@ function refreshModifiersState(newTags) {
|
||||
})
|
||||
}
|
||||
})
|
||||
refreshTagsList()
|
||||
refreshTagsList(inactiveTags)
|
||||
}
|
||||
|
||||
function refreshInactiveTags(inactiveTags) {
|
||||
@ -235,7 +235,7 @@ function refreshInactiveTags(inactiveTags) {
|
||||
})
|
||||
}
|
||||
|
||||
function refreshTagsList() {
|
||||
function refreshTagsList(inactiveTags) {
|
||||
editorModifierTagsList.innerHTML = ''
|
||||
|
||||
if (activeTags.length == 0) {
|
||||
@ -267,6 +267,7 @@ function refreshTagsList() {
|
||||
let brk = document.createElement('br')
|
||||
brk.style.clear = 'both'
|
||||
editorModifierTagsList.appendChild(brk)
|
||||
refreshInactiveTags(inactiveTags)
|
||||
document.dispatchEvent(new Event('refreshImageModifiers')) // notify plugins that the image tags have been refreshed
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user