diff --git a/broker.lua b/broker.lua index ee13e20..1c2ef46 100644 --- a/broker.lua +++ b/broker.lua @@ -71,11 +71,21 @@ local function OnClick(_, button) bclick() end elseif(button=="RightButton") then - if(InterfaceOptionsFrame:IsVisible() and not InCombatLockdown()) then - InterfaceOptionsFrame:Hide() - else - InterfaceOptionsFrame_OpenToCategory(childName) - InterfaceOptionsFrame_OpenToCategory(childName) -- Call it twice because auf WoW-Bug + if(not InCombatLockdown()) then + 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 end