from retail
This commit is contained in:
@@ -262,7 +262,7 @@ local function removeFuncs(intable, removeFunc)
|
||||
intable[i] = nil;
|
||||
elseif (i == "func" and removeFunc) then
|
||||
intable[i] = nil
|
||||
elseif(type(v) == "table" and i ~= "values") then
|
||||
elseif(type(v) == "table" and i ~= "values" and i ~= "extraFunctions") then
|
||||
removeFuncs(v, removeFunc)
|
||||
end
|
||||
end
|
||||
@@ -1233,8 +1233,8 @@ local function AddCodeOption(args, data, name, prefix, url, order, hiddenFunc, p
|
||||
extraFunctions = extraFunctions or {};
|
||||
tinsert(extraFunctions, 1, {
|
||||
buttonLabel = L["Expand"],
|
||||
func = function()
|
||||
WeakAuras.OpenTextEditor(data, path, encloseInFunction, multipath, reloadOptions, setOnParent, url)
|
||||
func = function(info)
|
||||
WeakAuras.OpenTextEditor(WeakAuras.GetPickedDisplay(), path, encloseInFunction, multipath, reloadOptions, setOnParent, url)
|
||||
end
|
||||
});
|
||||
|
||||
|
||||
@@ -760,7 +760,7 @@ function WeakAuras.CreateFrame()
|
||||
end
|
||||
end
|
||||
if (type(self.pickedDisplay) == "string" and self.pickedDisplay == id)
|
||||
or (type(self.pickedDisplay == "table") and id == tempGroup.id)
|
||||
or (type(self.pickedDisplay) == "table" and id == tempGroup.id)
|
||||
then
|
||||
frame:UpdateOptions()
|
||||
end
|
||||
@@ -1184,6 +1184,13 @@ function WeakAuras.CreateFrame()
|
||||
self:FillOptions()
|
||||
end
|
||||
|
||||
frame.GetPickedDisplay = function(self)
|
||||
if type(self.pickedDisplay) == "string" then
|
||||
return WeakAuras.GetData(self.pickedDisplay)
|
||||
end
|
||||
return self.pickedDisplay
|
||||
end
|
||||
|
||||
frame:SetClampedToScreen(true)
|
||||
local w, h = frame:GetSize()
|
||||
local left, right, top, bottom = w/2,-w/2, 0, h-25
|
||||
|
||||
@@ -727,6 +727,10 @@ function WeakAuras.EnsureOptions(data, subOption)
|
||||
return frame:EnsureOptions(data, subOption)
|
||||
end
|
||||
|
||||
function WeakAuras.GetPickedDisplay()
|
||||
return frame:GetPickedDisplay()
|
||||
end
|
||||
|
||||
function WeakAuras.GetSpellTooltipText(id)
|
||||
local tooltip = WeakAuras.GetHiddenTooltip();
|
||||
tooltip:SetSpellByID(id);
|
||||
|
||||
Reference in New Issue
Block a user