From 85df0d61d587bcc9fd5b8a5aa2ec98c374d57266 Mon Sep 17 00:00:00 2001 From: Mikayla Date: Sat, 28 Sep 2024 22:35:22 +0000 Subject: [PATCH] #539 possible fixes for rare listbox issues --- coordinator/startup.lua | 2 +- coordinator/ui/components/pkt_entry.lua | 2 +- coordinator/ui/layout/front_panel.lua | 2 +- graphics/element.lua | 2 +- supervisor/panel/components/chk_entry.lua | 2 +- supervisor/panel/components/pdg_entry.lua | 2 +- supervisor/panel/components/rtu_entry.lua | 2 +- supervisor/panel/front_panel.lua | 6 +++--- supervisor/startup.lua | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/coordinator/startup.lua b/coordinator/startup.lua index 637f500..950fdfc 100644 --- a/coordinator/startup.lua +++ b/coordinator/startup.lua @@ -19,7 +19,7 @@ local renderer = require("coordinator.renderer") local sounder = require("coordinator.sounder") local threads = require("coordinator.threads") -local COORDINATOR_VERSION = "v1.5.9" +local COORDINATOR_VERSION = "v1.5.10" local CHUNK_LOAD_DELAY_S = 30.0 diff --git a/coordinator/ui/components/pkt_entry.lua b/coordinator/ui/components/pkt_entry.lua index b7a8d1e..78084f9 100644 --- a/coordinator/ui/components/pkt_entry.lua +++ b/coordinator/ui/components/pkt_entry.lua @@ -29,7 +29,7 @@ local function init(parent, id) local ps = iocontrol.get_db().fp.ps -- root div - local root = Div{parent=parent,x=2,y=2,height=4,width=parent.get_width()-2,hidden=true} + local root = Div{parent=parent,x=2,y=2,height=4,width=parent.get_width()-2} local entry = Div{parent=root,x=2,y=1,height=3,fg_bg=s_hi_bright} local ps_prefix = "pkt_" .. id .. "_" diff --git a/coordinator/ui/layout/front_panel.lua b/coordinator/ui/layout/front_panel.lua index 11ae58f..46d506b 100644 --- a/coordinator/ui/layout/front_panel.lua +++ b/coordinator/ui/layout/front_panel.lua @@ -146,7 +146,7 @@ local function init(panel, num_units) local api_page = Div{parent=page_div,x=1,y=1,hidden=true} local api_list = ListBox{parent=api_page,x=1,y=1,height=17,width=51,scroll_height=1000,fg_bg=style.fp.text_fg,nav_fg_bg=cpair(colors.gray,colors.lightGray),nav_active=cpair(colors.black,colors.gray)} - local _ = Div{parent=api_list,height=1,hidden=true} -- padding + local _ = Div{parent=api_list,height=1} -- padding -- assemble page panes diff --git a/graphics/element.lua b/graphics/element.lua index 0d6800a..dda6c1d 100644 --- a/graphics/element.lua +++ b/graphics/element.lua @@ -57,7 +57,7 @@ function element.new(args, constraint, child_offset_x, child_offset_y) offset_x = 0, offset_y = 0, next_y = 1, -- next child y coordinate - next_id = 0, -- next child ID + next_id = 1, -- next child ID subscriptions = {}, ---@type { ps: psil, key: string, func: function }[] button_down = { events.new_coord_2d(-1, -1), events.new_coord_2d(-1, -1), events.new_coord_2d(-1, -1) }, focused = false, diff --git a/supervisor/panel/components/chk_entry.lua b/supervisor/panel/components/chk_entry.lua index eebba3b..ec86bac 100644 --- a/supervisor/panel/components/chk_entry.lua +++ b/supervisor/panel/components/chk_entry.lua @@ -21,7 +21,7 @@ local cpair = core.cpair ---@param fail_code integer failure code local function init(parent, msg, fail_code) -- root div - local root = Div{parent=parent,x=2,y=2,height=4,width=parent.get_width()-2,hidden=true} + local root = Div{parent=parent,x=2,y=2,height=4,width=parent.get_width()-2} local entry = Div{parent=root,x=2,y=1,height=3,fg_bg=style.theme.highlight_box_bright} local fg_bg = cpair(colors.black,colors.yellow) diff --git a/supervisor/panel/components/pdg_entry.lua b/supervisor/panel/components/pdg_entry.lua index d160ef3..368f4bc 100644 --- a/supervisor/panel/components/pdg_entry.lua +++ b/supervisor/panel/components/pdg_entry.lua @@ -26,7 +26,7 @@ local function init(parent, id) local label_fg = style.fp.label_fg -- root div - local root = Div{parent=parent,x=2,y=2,height=4,width=parent.get_width()-2,hidden=true} + local root = Div{parent=parent,x=2,y=2,height=4,width=parent.get_width()-2} local entry = Div{parent=root,x=2,y=1,height=3,fg_bg=style.theme.highlight_box_bright} local ps_prefix = "pdg_" .. id .. "_" diff --git a/supervisor/panel/components/rtu_entry.lua b/supervisor/panel/components/rtu_entry.lua index 4ca4058..2de0c0f 100644 --- a/supervisor/panel/components/rtu_entry.lua +++ b/supervisor/panel/components/rtu_entry.lua @@ -26,7 +26,7 @@ local function init(parent, id) local label_fg = style.fp.label_fg -- root div - local root = Div{parent=parent,x=2,y=2,height=4,width=parent.get_width()-2,hidden=true} + local root = Div{parent=parent,x=2,y=2,height=4,width=parent.get_width()-2} local entry = Div{parent=root,x=2,y=1,height=3,fg_bg=style.theme.highlight_box_bright} local ps_prefix = "rtu_" .. id .. "_" diff --git a/supervisor/panel/front_panel.lua b/supervisor/panel/front_panel.lua index 845ed84..e31d8bb 100644 --- a/supervisor/panel/front_panel.lua +++ b/supervisor/panel/front_panel.lua @@ -120,7 +120,7 @@ local function init(panel) local rtu_page = Div{parent=page_div,x=1,y=1,hidden=true} local rtu_list = ListBox{parent=rtu_page,x=1,y=1,height=17,width=51,scroll_height=1000,fg_bg=cpair(colors.black,colors.ivory),nav_fg_bg=cpair(colors.gray,colors.lightGray),nav_active=cpair(colors.black,colors.gray)} - local _ = Div{parent=rtu_list,height=1,hidden=true} -- padding + local _ = Div{parent=rtu_list,height=1} -- padding -- coordinator session page @@ -148,13 +148,13 @@ local function init(panel) local pkt_page = Div{parent=page_div,x=1,y=1,hidden=true} local pdg_list = ListBox{parent=pkt_page,x=1,y=1,height=17,width=51,scroll_height=1000,fg_bg=style.fp.text_fg,nav_fg_bg=cpair(colors.gray,colors.lightGray),nav_active=cpair(colors.black,colors.gray)} - local _ = Div{parent=pdg_list,height=1,hidden=true} -- padding + local _ = Div{parent=pdg_list,height=1} -- padding -- RTU device ID check/diagnostics page local chk_page = Div{parent=page_div,x=1,y=1,hidden=true} local chk_list = ListBox{parent=chk_page,x=1,y=1,height=17,width=51,scroll_height=1000,fg_bg=style.fp.text_fg,nav_fg_bg=cpair(colors.gray,colors.lightGray),nav_active=cpair(colors.black,colors.gray)} - local _ = Div{parent=chk_list,height=1,hidden=true} -- padding + local _ = Div{parent=chk_list,height=1} -- padding -- info page diff --git a/supervisor/startup.lua b/supervisor/startup.lua index 08a1a89..5e47cef 100644 --- a/supervisor/startup.lua +++ b/supervisor/startup.lua @@ -22,7 +22,7 @@ local supervisor = require("supervisor.supervisor") local svsessions = require("supervisor.session.svsessions") -local SUPERVISOR_VERSION = "v1.5.4" +local SUPERVISOR_VERSION = "v1.5.5" local println = util.println local println_ts = util.println_ts