mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 13:10:00 +00:00
gui: restore profile and chat settings on load
This commit is contained in:
+10
-1
@@ -1413,9 +1413,18 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
if C.global.profile and pfUI_profiles[C.global.profile] then
|
||||
CreateQuestionDialog(T["Load profile"] .. " '|cff33ffcc" .. C.global.profile .. "|r'?", function()
|
||||
local selp = C.global.profile
|
||||
local rchat = C.chat.right.enable
|
||||
|
||||
-- load profile
|
||||
_G["pfUI_config"] = CopyTable(pfUI_profiles[C.global.profile])
|
||||
|
||||
-- restore values
|
||||
pfUI:UpdateConfig("global", nil, "profile", selp)
|
||||
pfUI:UpdateConfig("chat", "right", "enable", rchat)
|
||||
|
||||
-- add default values
|
||||
pfUI:LoadConfig()
|
||||
C.global.profile = selp
|
||||
|
||||
ReloadUI()
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user