ui-widgets: keep checkbox visible during init

the SetPoint fails by having the wrong offsets, when being aligned to a
hidden texture. Due to this, keep the checkmark visible till the OnShow
happens and decide there wether to display the checkmark or not.
This commit is contained in:
shagu
2020-04-13 12:48:48 +02:00
parent f4c5d31829
commit b550efdd97
+8 -5
View File
@@ -222,11 +222,14 @@ do -- dropdown
frame.id = id
frame.text:SetText(self.menu[id].text)
if self.id == id then
frame.icon:Show()
else
frame.icon:Hide()
end
frame:SetScript("OnShow", function()
if this.parent.id == this.id then
this.icon:Show()
else
this.icon:Hide()
end
end)
frame:SetScript("OnClick", function()
this.parent:SetSelection(this.id)