mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-27 10:11:59 -08:00
add option to reorder tabs
fix Reload UI not working
This commit is contained in:
parent
30410fd355
commit
b397f63e00
2 changed files with 6 additions and 2 deletions
|
|
@ -1644,7 +1644,10 @@ def create_ui():
|
|||
parameters_copypaste.connect_paste_params_buttons()
|
||||
|
||||
with gr.Tabs(elem_id="tabs") as tabs:
|
||||
for interface, label, ifid in interfaces:
|
||||
tab_order = {k: i for i, k in enumerate(opts.ui_tab_order)}
|
||||
sorted_interfaces = sorted(interfaces, key=lambda x: tab_order.get(x[1], 9999))
|
||||
|
||||
for interface, label, ifid in sorted_interfaces:
|
||||
if label in shared.opts.hidden_tabs:
|
||||
continue
|
||||
with gr.TabItem(label, id=ifid, elem_id=f"tab_{ifid}"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue