fix: control element command broken when overriding shorthand title

ref #210
This commit is contained in:
tomasklaen
2022-09-18 14:51:18 +02:00
parent 3c85721f1a
commit f6cad02037

View File

@@ -3112,8 +3112,9 @@ function Controls:serialize()
for i, item in ipairs(items) do
local config = shorthands[item.config] and shorthands[item.config] or item.config
local config_tooltip = split(config, ' *%? *')
config = shorthands[config_tooltip[1]] and shorthands[config_tooltip[1]] or config
local tooltip = config_tooltip[2]
config = shorthands[config_tooltip[1]]
and split(shorthands[config_tooltip[1]], ' *%? *')[1] or config_tooltip[1]
local parts = split(config, ' *: *')
local kind, params = parts[1], itable_slice(parts, 2)