mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#485 fixed assertion with height auto incrementing y when inheriting height
This commit is contained in:
parent
25dc47d520
commit
3bfcb1d83c
@ -7,7 +7,7 @@ local flasher = require("graphics.flasher")
|
||||
|
||||
local core = {}
|
||||
|
||||
core.version = "2.2.3"
|
||||
core.version = "2.2.4"
|
||||
|
||||
core.flasher = flasher
|
||||
core.events = events
|
||||
|
@ -3,6 +3,7 @@
|
||||
--
|
||||
|
||||
local util = require("scada-common.util")
|
||||
local log = require("scada-common.log")
|
||||
|
||||
local core = require("graphics.core")
|
||||
|
||||
@ -198,6 +199,9 @@ function element.new(args, child_offset_x, child_offset_y)
|
||||
---@param offset_y integer y offset for mouse events
|
||||
---@param next_y integer next line if no y was provided
|
||||
function protected.prepare_template(offset_x, offset_y, next_y)
|
||||
-- don't auto incrememnt y if inheriting height, that would cause an assertion
|
||||
next_y = util.trinary(args.height == nil, 1, next_y)
|
||||
|
||||
-- record offsets in case there is a reposition
|
||||
self.offset_x = offset_x
|
||||
self.offset_y = offset_y
|
||||
|
Loading…
Reference in New Issue
Block a user