From 31ff2773b3e771fa8e843eabd3292d03b2fc5ea2 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Wed, 15 Jul 2026 13:45:06 -0500 Subject: [PATCH] Defer macrotweak conflicts; use SetSize Replace the previous RunNextFrame conflict check with per-addon EventUtil.ContinueOnAddOnLoaded calls in modules/macrotweak.lua so macrotweak is disabled as soon as known conflicting addons load. Simplify variable naming and ensure the disabled flag is set correctly. In skins/blizzard/macro.lua replace separate SetHeight/SetWidth calls with a single SetSize(150,22) for MacroEditButton to tidy UI sizing. --- modules/macrotweak.lua | 16 ++++++---------- skins/blizzard/macro.lua | 3 +-- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/modules/macrotweak.lua b/modules/macrotweak.lua index 026ce3dc..781bee51 100644 --- a/modules/macrotweak.lua +++ b/modules/macrotweak.lua @@ -2,15 +2,14 @@ pfUI:RegisterModule("macrotweak", function () local conflictAddons = { "Supermacro", "SuperCleveRoidMacros", "UltimaMacros" } local disabled = false - local function CheckConflicts() - for _, name in pairs(conflictAddons) do - if IsAddOnLoaded(name) then + for _, addon in pairs(conflictAddons) do + local name = addon + EventUtil.ContinueOnAddOnLoaded(name, function() + if not disabled then DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: " .. name .. " found, macrotweak disabled.") - disabled = true - return true end - end - return false + disabled = true + end) end -- do not write macro calls into chat input history @@ -64,7 +63,4 @@ pfUI:RegisterModule("macrotweak", function () UseInventoryItem(slot) end end) - - -- Check conflicts after one tick so all addons have finished loading - RunNextFrame(CheckConflicts) end) \ No newline at end of file diff --git a/skins/blizzard/macro.lua b/skins/blizzard/macro.lua index fbd05d44..ec5638ef 100644 --- a/skins/blizzard/macro.lua +++ b/skins/blizzard/macro.lua @@ -45,8 +45,7 @@ pfUI:RegisterSkin("Macro", function () MacroNewButton:ClearAllPoints() MacroNewButton:SetPoint("RIGHT", MacroExitButton, "LEFT", -2*bpad, 0) - MacroEditButton:SetHeight(22) - MacroEditButton:SetWidth(150) + MacroEditButton:SetSize(150, 22) MacroEditButton:ClearAllPoints() MacroEditButton:SetPoint("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 6, -2)