From 3b82fedf98f9fdb2b523f8d4eafe817e149383f2 Mon Sep 17 00:00:00 2001 From: John-Henry Lim <42513874+Interpause@users.noreply.github.com> Date: Sun, 5 Mar 2023 22:49:42 +0800 Subject: [PATCH] Fix #122 --- scripts/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/main.py b/scripts/main.py index 6f8b0f4..b4ac6dd 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -54,7 +54,7 @@ def on_app_started(demo: gr.Blocks, app: FastAPI): def on_ui_settings(): # hook to add our own settings to the settings tab - pass + shared.opts.add_option("hide_auto_sd_paint_ext_tab", shared.OptionInfo(False, 'Hide "auto-sd-paint-ext Guide/Panel" after restart.', gr.Checkbox, section=('ui', "User interface"))) def krita_help(folder): @@ -75,6 +75,8 @@ def krita_help(folder): def on_ui_tabs(): + if shared.opts.hide_auto_sd_paint_ext_tab: + return # hook to create our own UI tab with gr.Blocks(analytics_enabled=False) as interface: gr.Markdown(