Skip to content

Commit e0215b3

Browse files
Co-authored-by: vaisest <vaisest@users.noreply.github.com>
1 parent 2531a74 commit e0215b3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Classes/CompareTab.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,11 @@ local function syncControlValue(ctrl, varData, val)
19961996
ctrl.state = val or false
19971997
elseif varData.type == "count" or varData.type == "integer"
19981998
or varData.type == "countAllowZero" or varData.type == "float" then
1999-
ctrl:SetText(tostring(val or ""))
1999+
local text = tostring(val or "")
2000+
-- avoid setting text every time as otherwise this clears user selections on every frame
2001+
if not ctrl.hasFocus and text ~= ctrl.buf then
2002+
ctrl:SetText(text)
2003+
end
20002004
elseif varData.type == "list" then
20012005
ctrl:SelByValue(val or (varData.list[1] and varData.list[1].val), "val")
20022006
end

0 commit comments

Comments
 (0)