Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,20 @@ function DF:LightweightUpdateAuraDurationText(auraType)
IterateFramesInMode(mode, UpdateDuration)
end

-- Sync linked sections between party and raid modes
function DF:SyncLinkedSections()
if not DF.GUI or not DF.db or not DF.db.linkedSections then return end
if not next(DF.db.linkedSections) then return end
local mode = DF.GUI.SelectedMode
if mode ~= "party" and mode ~= "raid" then return end

for pageId, prefixes in pairs(DF.SectionRegistry or {}) do
if DF.db.linkedSections[pageId] then
DF:CopySectionSettingsRaw(prefixes, mode)
end
end
end

-- Update aura border settings (both regular and expiring borders)
function DF:LightweightUpdateAuraBorder(auraType)
local mode = DF.GUI and DF.GUI.SelectedMode or "party"
Expand Down Expand Up @@ -3080,6 +3094,7 @@ eventFrame:SetScript("OnEvent", function(self, event, arg1)
raidAutoProfiles = DF:DeepCopy(DF.RaidAutoProfilesDefaults),
classColors = {},
powerColors = {},
linkedSections = {},
}
end

Expand Down Expand Up @@ -3110,6 +3125,11 @@ eventFrame:SetScript("OnEvent", function(self, event, arg1)
if not DF.db.powerColors then
DF.db.powerColors = {}
end

-- Ensure linkedSections table exists (shared across party/raid)
if not DF.db.linkedSections then
DF.db.linkedSections = {}
end

-- Migrate any missing settings from defaults
for key, value in pairs(DF.PartyDefaults) do
Expand Down Expand Up @@ -4043,6 +4063,8 @@ function DF:UpdateAll()
return
end

DF:SyncLinkedSections()

-- Invalidate aura layout so all frames re-apply layout on next aura update
DF:InvalidateAuraLayout()

Expand Down
6 changes: 6 additions & 0 deletions GUI/GUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ local C_HOVER = {r = 0.22, g = 0.22, b = 0.22, a = 1}
local C_TEXT = {r = 0.9, g = 0.9, b = 0.9, a = 1}
local C_TEXT_DIM = {r = 0.6, g = 0.6, b = 0.6, a = 1}

DF.SectionRegistry = DF.SectionRegistry or {}

-- Track selected mode
GUI.SelectedMode = "party"

Expand Down Expand Up @@ -4882,6 +4884,8 @@ function DF:CreateGUI()
end)

btnParty:SetScript("OnClick", function()
DF:SyncLinkedSections()

-- Before switching tabs, clean up current mode's test mode and unlock state
if GUI.SelectedMode == "raid" then
-- Lock raid frames if unlocked
Expand Down Expand Up @@ -4910,6 +4914,8 @@ function DF:CreateGUI()
GUI:RefreshCurrentPage()
end)
btnRaid:SetScript("OnClick", function()
DF:SyncLinkedSections()

-- Before switching tabs, clean up current mode's test mode and unlock state
if GUI.SelectedMode == "party" then
-- Lock party frames if unlocked
Expand Down
Loading