Quantcast

This should fix lines ignoring clicks at random

Darthpred [09-09-16 - 14:02]
This should fix lines ignoring clicks at random
Filename
ElvUI_SLE/core/dropdown.lua
diff --git a/ElvUI_SLE/core/dropdown.lua b/ElvUI_SLE/core/dropdown.lua
index 20b7e38..c6c54ad 100644
--- a/ElvUI_SLE/core/dropdown.lua
+++ b/ElvUI_SLE/core/dropdown.lua
@@ -62,6 +62,7 @@ local function CreateListButton(frame)

 	button:SetScript("OnEnter", OnEnter)
 	button:SetScript("OnLeave", OnLeave)
+	button:HookScript("OnClick", OnClick)

 	return button
 end
@@ -127,9 +128,6 @@ function SLE:DropDown(list, frame, MenuAnchor, FramePoint, xOffset, yOffset, par
 				else
 					SLE:ErrorPrint("Wrong argument for button type: "..btn.secure.buttonType)
 				end
-				btn:HookScript("OnClick", OnClick)
-			else
-				btn:SetScript("OnClick", OnClick)
 			end
 			btn.UseTooltip = list[i].UseTooltip
 			if list[i].TooltipText then btn.TooltipText = list[i].TooltipText end