Skip to content

Commit c6f07c8

Browse files
committed
1 parent b15ebac commit c6f07c8

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
@@ -1963,7 +1963,11 @@ local function syncControlValue(ctrl, varData, val)
19631963
ctrl.state = val or false
19641964
elseif varData.type == "count" or varData.type == "integer"
19651965
or varData.type == "countAllowZero" or varData.type == "float" then
1966-
ctrl:SetText(tostring(val or ""))
1966+
local text = tostring(val or "")
1967+
-- avoid setting text every time as otherwise this clears user selections on every frame
1968+
if not ctrl.hasFocus and text ~= ctrl.buf then
1969+
ctrl:SetText(text)
1970+
end
19671971
elseif varData.type == "list" then
19681972
ctrl:SelByValue(val or (varData.list[1] and varData.list[1].val), "val")
19691973
end

0 commit comments

Comments
 (0)