Remove old binding when a new is set

This commit is contained in:
robin 2021-05-14 13:51:53 +02:00
parent f9d0643205
commit 3d7ecd7fca
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,9 @@ local child = addon[childName]
local L = LibStub("AceLocale-3.0"):GetLocale(childName, true)
function child:PrefChanged(info, value, oldvalue)
if(info[#info] == 'toggleMap' and value ~= oldvalue) then
if(oldvalue) then
SetBinding(oldvalue)
end
SetBinding(value, "CLICK zzCoords_MinimapToggleFrame:LeftButton")
end
child:ZoneEvent()