mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-03 14:21:38 -08:00
fix refresh bug
This commit is contained in:
parent
43f769b339
commit
5747321f69
2 changed files with 304 additions and 277 deletions
|
|
@ -847,12 +847,10 @@ function extraNetworksControlRefreshOnClick(event, tabname_full) {
|
|||
*/
|
||||
clearTimeout(extra_networks_refresh_internal_debounce_timer);
|
||||
extra_networks_refresh_internal_debounce_timer = setTimeout(() => {
|
||||
// We want to reset all tabs lists on refresh click so that the viewing area
|
||||
// We want to reset tab lists on refresh click so that the viewing area
|
||||
// shows that it is loading new data.
|
||||
for (const tab of Object.values(extra_networks_tabs)) {
|
||||
tab.tree_list.clear();
|
||||
tab.cards_list.clear();
|
||||
}
|
||||
extra_networks_tabs[tabname_full].tree_list.clear();
|
||||
extra_networks_tabs[tabname_full].cards_list.clear();
|
||||
// Fire an event for this button click.
|
||||
gradioApp().getElementById(`${tabname_full}_extra_refresh_internal`).dispatchEvent(new Event("click"));
|
||||
}, EXTRA_NETWORKS_REFRESH_INTERNAL_DEBOUNCE_TIMEOUT_MS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue