diff --git a/Cursive.toc b/Cursive.toc index 3fe2a20..5ce1aae 100644 --- a/Cursive.toc +++ b/Cursive.toc @@ -1,6 +1,6 @@ ## Interface: 11200 -## Title: [|CFF33AAFFSUPERWOW|R] Cursive 2.4.0 -## Title-zhCN: [|CFF33AAFFSUPERWOW|R] Cursive 2.4.0 +## Title: [|CFF33AAFFSUPERWOW|R] Cursive 2.4.1 +## Title-zhCN: [|CFF33AAFFSUPERWOW|R] Cursive 2.4.1 ## Author: Pepopo ## Notes: Uses SuperWoW GUIDs to show units in combat and track curses ## Notes-zhCN: 使用SuperWoW的GUID功能来显示战斗中的单位并监视诅咒等 diff --git a/settings.lua b/settings.lua index ee30f6c..f3c9bdc 100644 --- a/settings.lua +++ b/settings.lua @@ -180,7 +180,6 @@ local barOptions = { if v ~= Cursive.db.profile.bartexture then Cursive.db.profile.bartexture = v Cursive.UpdateFramesFromConfig() - Cursive.ResetUnitFrames() end end, }, diff --git a/ui.lua b/ui.lua index bf3414c..e622b14 100644 --- a/ui.lua +++ b/ui.lua @@ -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