mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 11:12:35 +00:00
add option to reorder tabs
fix Reload UI not working
This commit is contained in:
@@ -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}"):
|
||||
|
Reference in New Issue
Block a user