Rewrite Onclick Settings to not open/close in combat
This commit is contained in:
parent
94f0276604
commit
ee082d2568
|
@ -23,17 +23,19 @@ function lib:DefaultOnClick(_, button, addon, childName)
|
|||
end
|
||||
else
|
||||
if(not InCombatLockdown()) then
|
||||
if(SettingsPanel and SettingsPanel.CloseButton:IsVisible()) then
|
||||
SettingsPanel:Hide()
|
||||
elseif(InterfaceOptionsFrame and InterfaceOptionsFrame:IsVisible()) then
|
||||
InterfaceOptionsFrame:Hide()
|
||||
end
|
||||
else
|
||||
if(Settings and Settings.OpenToCategory) then
|
||||
Settings.OpenToCategory(childName)
|
||||
else
|
||||
InterfaceOptionsFrame_OpenToCategory(childName)
|
||||
InterfaceOptionsFrame_OpenToCategory(childName) -- Twice because of a bug in InterfaceOptionsFrame_OpenToCategory
|
||||
if(SettingsPanel) then
|
||||
if(SettingsPanel:IsVisible()) then
|
||||
SettingsPanel:Hide()
|
||||
else
|
||||
Settings.OpenToCategory(childName)
|
||||
end
|
||||
elseif(InterfaceOptionsFrame) then
|
||||
if(InterfaceOptionsFrame:IsVisible()) then
|
||||
InterfaceOptionsFrame:Hide()
|
||||
else
|
||||
InterfaceOptionsFrame_OpenToCategory(childName)
|
||||
InterfaceOptionsFrame_OpenToCategory(childName) -- Twice because of a bug in InterfaceOptionsFrame_OpenToCategory
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue