From 5b3b334fce14b8952d344c6be0d39ead4a879045 Mon Sep 17 00:00:00 2001 From: Buds Date: Mon, 9 Oct 2023 01:47:46 +0200 Subject: [PATCH] Dynamic group options: some options were incorrectly shown with Group by Frame enable --- WeakAurasOptions/CommonOptions.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WeakAurasOptions/CommonOptions.lua b/WeakAurasOptions/CommonOptions.lua index fb9d1e6418..8859767f1d 100644 --- a/WeakAurasOptions/CommonOptions.lua +++ b/WeakAurasOptions/CommonOptions.lua @@ -1123,7 +1123,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g order = 72, image = function() return "", 0, 0 end, hidden = function() - return IsParentDynamicGroup() or not (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE") + return IsParentDynamicGroup() or not (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE" or IsGroupByFrame()) end, }, -- Input field to select frame to anchor on @@ -1133,7 +1133,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g name = L["Frame"], order = 73, hidden = function() - if (IsParentDynamicGroup()) then + if (IsParentDynamicGroup() or IsGroupByFrame()) then return true; end return not (data.anchorFrameType == "SELECTFRAME") @@ -1146,7 +1146,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g name = L["Choose"], order = 74, hidden = function() - if (IsParentDynamicGroup()) then + if (IsParentDynamicGroup() or IsGroupByFrame()) then return true; end return not (data.anchorFrameType == "SELECTFRAME") @@ -1287,7 +1287,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g OptionsPrivate.commonOptions.AddCodeOption(positionOptions, data, L["Custom Anchor"], "custom_anchor", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-anchor-function", - 71.5, function() return not(data.anchorFrameType == "CUSTOM" and not IsParentDynamicGroup()) end, + 71.5, function() return not(data.anchorFrameType == "CUSTOM" and not IsParentDynamicGroup() and not IsGroupByFrame()) end, {"customAnchor"}, false, { setOnParent = group }) return positionOptions; end