mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2025-07-26 03:22:51 +00:00
#539 possible fixes for rare listbox issues
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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 .. "_"
|
||||
|
@ -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
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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 .. "_"
|
||||
|
@ -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 .. "_"
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user