From b550efdd97b5e5e09cb8fd9306af27b9eb3c22aa Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 13 Apr 2020 12:48:48 +0200 Subject: [PATCH] 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. --- api/ui-widgets.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/api/ui-widgets.lua b/api/ui-widgets.lua index 263e4e1a..5212c4f4 100644 --- a/api/ui-widgets.lua +++ b/api/ui-widgets.lua @@ -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)