Skip to content

Commit ac9ab06

Browse files
committed
Fixed an error when trying to open the config UI in Midnight
1 parent eb40967 commit ac9ab06

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

embeds.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
2-
https://raw.githubusercontent.com/Meorawr/wow-ui-schema/main/UI.xsd">
2+
https://raw.githubusercontent.com/Gethe/wow-ui-source/refs/heads/live/Interface/AddOns/Blizzard_SharedXML/UI.xsd">
33
<Script file="libs\LibStub\LibStub.lua"/>
44
<Include file="libs\CallbackHandler-1.0\CallbackHandler-1.0.xml"/>
55
<Include file="libs\AceAddon-3.0\AceAddon-3.0.xml"/>

main.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function DialogKey:OnInitialize()
8282
elseif func == 'remove' then
8383
self:RemoveFrame(args)
8484
else
85-
Settings.OpenToCategory(ns.configPanelName)
85+
ns:OpenConfig()
8686
end
8787
end
8888
end

options.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,17 @@ function ns:RegisterOptions()
156156
if not initialized then
157157
initialized = true
158158
LibStub("AceConfig-3.0"):RegisterOptionsTable(self.configPanelName, function() return self:GetOptionsTable() end)
159-
LibStub("AceConfigDialog-3.0"):AddToBlizOptions(self.configPanelName)
159+
local _, categoryID = LibStub("AceConfigDialog-3.0"):AddToBlizOptions(self.configPanelName)
160+
self.categoryID = categoryID
160161
else
161162
LibStub("AceConfigRegistry-3.0"):NotifyChange(self.configPanelName)
162163
end
163164
end
164165

166+
function ns:OpenConfig()
167+
Settings.OpenToCategory(self.categoryID)
168+
end
169+
165170
function ns:GetOptionsTable()
166171
local db = self.Core.db
167172
local function optionSetter(info, val) db[info[#info]] = val end

0 commit comments

Comments
 (0)