mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
+10
-5
@@ -248,21 +248,26 @@ def create_ui(disabled_tabs=None):
|
||||
sections = []
|
||||
options_count = len(shared.opts.data_labels)
|
||||
for item in shared.opts.data_labels.values(): # get unique sections from all items
|
||||
if len(item.section) == 2:
|
||||
section_id, section_text = item.section
|
||||
elif len(item.section) == 3: # compatibility item with a1111 extensions
|
||||
_category, section_id, section_text = item.section
|
||||
section = item.section or (None, 'Hidden')
|
||||
if len(section) == 2:
|
||||
section_id, section_text = section
|
||||
elif len(section) == 3: # compatibility item with a1111 extensions
|
||||
_category, section_id, section_text = section
|
||||
item.section = section_id, section_text
|
||||
else:
|
||||
section_id = None
|
||||
item.section = None, 'Hidden'
|
||||
section_text = 'Hidden'
|
||||
if (section_id, section_text) not in sections:
|
||||
sections.append((section_id, section_text))
|
||||
|
||||
with gr.Tabs(elem_id="settings"):
|
||||
quicksettings_list.clear()
|
||||
for (section_id, section_text) in sections:
|
||||
items = [item for item in shared.opts.data_labels.items() if item[1].section[0] == section_id] # find all items in this section
|
||||
items = [
|
||||
item for item in shared.opts.data_labels.items()
|
||||
if item[1].section is not None and item[1].section[0] == section_id
|
||||
] # find all items in this section
|
||||
hidden = section_id is None or 'hidden' in section_id.lower() or 'hidden' in section_text.lower()
|
||||
# log.trace(f'Settings: section="{section_id}" title="{section_text}" items={len(items)} hidden={hidden}')
|
||||
if hidden:
|
||||
|
||||
Reference in New Issue
Block a user