from retail
This commit is contained in:
@@ -853,7 +853,7 @@ local function addControlsForChange(args, order, data, conditionVariable, condit
|
||||
if (not message) then
|
||||
return true;
|
||||
end
|
||||
if (not OptionsPrivate.Private.ContainsPlaceHolders(message, "c")) then
|
||||
if (not OptionsPrivate.Private.ContainsCustomPlaceHolder(message)) then
|
||||
return true;
|
||||
end
|
||||
|
||||
@@ -1822,7 +1822,7 @@ local function addControlsForCondition(args, order, data, conditionVariable, con
|
||||
type = "execute",
|
||||
name = L["Condition %i"]:format(i),
|
||||
order = order,
|
||||
width = WeakAuras.doubleWidth - 0.45,
|
||||
width = WeakAuras.doubleWidth - 0.6,
|
||||
func = function()
|
||||
if data.controlledChildren then
|
||||
for id, reference in pairs(conditions[i].check.references) do
|
||||
@@ -1948,6 +1948,38 @@ local function addControlsForCondition(args, order, data, conditionVariable, con
|
||||
};
|
||||
order = order + 1;
|
||||
|
||||
args["condition" .. i .. "duplicate"] = {
|
||||
type = "execute",
|
||||
name = L["Duplicate"],
|
||||
order = order,
|
||||
func = function()
|
||||
if (data.controlledChildren) then
|
||||
for id, reference in pairs(conditions[i].check.references) do
|
||||
local auraData = WeakAuras.GetData(id);
|
||||
local clone = CopyTable(auraData[conditionVariable][reference.conditionIndex])
|
||||
tinsert(auraData[conditionVariable], reference.conditionIndex + 1, clone);
|
||||
WeakAuras.Add(auraData);
|
||||
OptionsPrivate.DuplicateCollapseData(auraData.id, "condition", {reference.conditionIndex})
|
||||
end
|
||||
WeakAuras.ClearAndUpdateOptions(data.id, true)
|
||||
return;
|
||||
else
|
||||
local clone = CopyTable(conditions[i])
|
||||
tinsert(conditions, i + 1, clone);
|
||||
WeakAuras.Add(data);
|
||||
OptionsPrivate.DuplicateCollapseData(data.id, "condition", {i})
|
||||
WeakAuras.ClearAndUpdateOptions(data.id, true)
|
||||
return;
|
||||
end
|
||||
end,
|
||||
width = 0.15,
|
||||
image = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\duplicate",
|
||||
imageWidth = 24,
|
||||
imageHeight = 24,
|
||||
control = "WeakAurasIcon"
|
||||
};
|
||||
order = order + 1;
|
||||
|
||||
args["condition" .. i .. "delete"] = {
|
||||
type = "execute",
|
||||
name = L["Delete"],
|
||||
|
||||
Reference in New Issue
Block a user