from retail
This commit is contained in:
@@ -313,13 +313,20 @@ function OptionsPrivate.GetInformationOptions(data)
|
||||
local sameDebugLog = true
|
||||
local commonDebugLog
|
||||
local debugLogDesc = ""
|
||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||
local effectiveDebugLog = child.information.debugLog and true or false
|
||||
debugLogDesc = debugLogDesc .. "|cFFE0E000"..child.id..": |r".. (effectiveDebugLog and "true" or "false") .. "\n"
|
||||
if commonDebugLog == nil then
|
||||
commonDebugLog = effectiveDebugLog
|
||||
elseif effectiveDebugLog ~= commonDebugLog then
|
||||
sameDebugLog = false
|
||||
|
||||
if isGroup and not isTmpGroup then
|
||||
sameDebugLog = true
|
||||
commonDebugLog = data.information.debugLog and true or false
|
||||
else
|
||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||
--- @type boolean
|
||||
local effectiveDebugLog = child.information.debugLog and true or false
|
||||
debugLogDesc = debugLogDesc .. "|cFFE0E000"..child.id..": |r".. (effectiveDebugLog and "true" or "false") .. "\n"
|
||||
if commonDebugLog == nil then
|
||||
commonDebugLog = effectiveDebugLog
|
||||
elseif effectiveDebugLog ~= commonDebugLog then
|
||||
sameDebugLog = false
|
||||
end
|
||||
end
|
||||
end
|
||||
args.debugLogToggle = {
|
||||
@@ -332,10 +339,15 @@ function OptionsPrivate.GetInformationOptions(data)
|
||||
return sameDebugLog and commonDebugLog
|
||||
end,
|
||||
set = function(info, v)
|
||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||
child.information.debugLog = v
|
||||
WeakAuras.Add(child)
|
||||
OptionsPrivate.ClearOptions(child.id)
|
||||
if isGroup and not isTmpGroup then
|
||||
data.information.debugLog = v
|
||||
WeakAuras.Add(data)
|
||||
else
|
||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||
child.information.debugLog = v
|
||||
WeakAuras.Add(child)
|
||||
OptionsPrivate.ClearOptions(child.id)
|
||||
end
|
||||
end
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
end
|
||||
@@ -350,18 +362,32 @@ function OptionsPrivate.GetInformationOptions(data)
|
||||
func = function()
|
||||
local fullMessage = L["WeakAuras %s on WoW %s"]:format(WeakAuras.versionString, WeakAuras.BuildInfo) .. "\n\n"
|
||||
local haveLogs = false
|
||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||
local auraLog = OptionsPrivate.Private.DebugLog.GetLogs(child.uid)
|
||||
if isGroup and not isTmpGroup then
|
||||
local auraLog = OptionsPrivate.Private.DebugLog.GetLogs(data.uid)
|
||||
if auraLog then
|
||||
haveLogs = true
|
||||
fullMessage = fullMessage .. L["Aura: '%s'"]:format(child.id)
|
||||
local version = child.semver or child.version
|
||||
fullMessage = fullMessage .. L["Aura: '%s'"]:format(data.id)
|
||||
local version = data.semver or data.version
|
||||
if (version) then
|
||||
fullMessage = fullMessage .. "\n" .. L["Version: %s"]:format(version)
|
||||
end
|
||||
fullMessage = fullMessage .. "\n" .. L["Debug Log:"] .. "\n" .. auraLog .. "\n\n"
|
||||
end
|
||||
else
|
||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||
local auraLog = OptionsPrivate.Private.DebugLog.GetLogs(child.uid)
|
||||
if auraLog then
|
||||
haveLogs = true
|
||||
fullMessage = fullMessage .. L["Aura: '%s'"]:format(child.id)
|
||||
local version = child.semver or child.version
|
||||
if (version) then
|
||||
fullMessage = fullMessage .. "\n" .. L["Version: %s"]:format(version)
|
||||
end
|
||||
fullMessage = fullMessage .. "\n" .. L["Debug Log:"] .. "\n" .. auraLog .. "\n\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if haveLogs then
|
||||
OptionsPrivate.OpenDebugLog(fullMessage)
|
||||
else
|
||||
@@ -376,8 +402,12 @@ function OptionsPrivate.GetInformationOptions(data)
|
||||
width = WeakAuras.normalWidth,
|
||||
order = order,
|
||||
func = function()
|
||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||
OptionsPrivate.Private.DebugLog.Clear(child.uid)
|
||||
if isGroup and not isTmpGroup then
|
||||
OptionsPrivate.Private.DebugLog.Clear(data.uid)
|
||||
else
|
||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||
OptionsPrivate.Private.DebugLog.Clear(child.uid)
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user