reload unit frames 3s after settings changes

This commit is contained in:
pepopo978
2025-08-06 10:40:02 -07:00
parent 74f5c80e22
commit 00c22ea07d
3 changed files with 13 additions and 3 deletions
+11
View File
@@ -157,9 +157,20 @@ Cursive.UpdateFramesFromConfig = function()
if ui.rootBarFrame then
UpdateRootBarFrame()
end
-- after 3 seconds reset the unit frames so all changes are applied
Cursive:ScheduleEvent("resetUnitFrames", Cursive.ResetUnitFrames, 3)
end
Cursive.ResetUnitFrames = function()
-- hide all existing unit frames
for col, rows in pairs(ui.unitFrames) do
for row, unitFrame in pairs(rows) do
if unitFrame and unitFrame:IsShown() then
unitFrame:Hide()
end
end
end
-- clear cached frames so they are recreated
ui.unitFrames = {}
end