Skip to content

Commit

Permalink
drop nomerge headers
Browse files Browse the repository at this point in the history
Closes #4105
  • Loading branch information
emptyrivers authored and InfusOnWoW committed Jan 20, 2025
1 parent 20c0d64 commit 2a01063
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
11 changes: 11 additions & 0 deletions WeakAuras/Modernize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2367,6 +2367,17 @@ function Private.Modernize(data, oldSnapshot)
end
end

if data.internalVersion < 82 then
-- noMerge for separator custom option doesn't make sense,
-- and groups achieve the desired effect better,
-- so drop the feature
for _, optionData in ipairs(data.authorOptions) do
if optionData.type == "header" then
optionData.noMerge = nil
end
end
end

data.internalVersion = max(data.internalVersion or 0, WeakAuras.InternalVersion())
end

Expand Down
1 change: 0 additions & 1 deletion WeakAuras/Types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3805,7 +3805,6 @@ Private.author_option_fields = {
header = {
useName = false,
text = "",
noMerge = false
},
group = {
groupType = "simple",
Expand Down
2 changes: 1 addition & 1 deletion WeakAuras/WeakAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local AddonName = ...
---@class Private
local Private = select(2, ...)

local internalVersion = 81
local internalVersion = 82

-- Lua APIs
local insert = table.insert
Expand Down
9 changes: 0 additions & 9 deletions WeakAurasOptions/AuthorOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1194,15 +1194,6 @@ typeControlAdders = {
return not option.useName
end
}
args[prefix .. "noMerge"] = {
type = "toggle",
name = name(option, "noMerge", L["Prevent Merging"]),
desc = desc(option, "noMerge", L["If checked, then this separator will not merge with other separators when selecting multiple auras."]),
order = order(),
width = WeakAuras.doubleWidth,
get = get(option, "noMerge"),
set = set(data, option, "noMerge"),
}
end,
group = function(options, args, data, order, prefix, i)
local option = options[i]
Expand Down

0 comments on commit 2a01063

Please sign in to comment.