mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-31 07:56:57 +00:00
Read the dock anchor only once a frame is docked
SetupMenu reads each radio's selection when the dropdown is set up at module load, before any frame is docked, so IsDockAnchor indexed a nil dock parent.
This commit is contained in:
+3
-1
@@ -529,8 +529,10 @@ pfUI:RegisterModule("unlock", function ()
|
||||
pfUI.unlock.dock.title:SetPoint("TOP", 0, -5)
|
||||
|
||||
-- anchor
|
||||
-- SetupMenu reads the selection at once, before any frame is docked
|
||||
local function IsDockAnchor(anchor)
|
||||
local position = pfUI_config["position"] and pfUI_config["position"][pfUI.unlock.dock.parent.fname]
|
||||
local drag = pfUI.unlock.dock.parent
|
||||
local position = drag and pfUI_config["position"] and pfUI_config["position"][drag.fname]
|
||||
return position and position["xpos"] and (position["anchor"] or "TOPLEFT") == anchor
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user