From 0902a26926c8a4bc40b976b1371a257e274a40d2 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 21 May 2021 00:03:06 +0200 Subject: [PATCH] Auto-close slice edit panel if no slices --- init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.lua b/init.lua index 7943e21..2a00462 100644 --- a/init.lua +++ b/init.lua @@ -563,6 +563,11 @@ schemedit.add_form("slice", { table[0,0;6.8,6;slices;]]..slices..[[;]]..selected..[[] ]] + -- Close edit panel if no slices + if self.panel_edit and slices == "" then + self.panel_edit = nil + end + if self.panel_add or self.panel_edit then local ypos_default, prob_default = "", "" local done_button = "button[5,7.18;2,1;done_add;"..F(S("Add")).."]"