reload unit frames 3s after settings changes
This commit is contained in:
+2
-2
@@ -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功能来显示战斗中的单位并监视诅咒等
|
||||
|
||||
@@ -180,7 +180,6 @@ local barOptions = {
|
||||
if v ~= Cursive.db.profile.bartexture then
|
||||
Cursive.db.profile.bartexture = v
|
||||
Cursive.UpdateFramesFromConfig()
|
||||
Cursive.ResetUnitFrames()
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user