From c4c124f654f9fe8949c8f56099a4b14d8eca1b6a Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Wed, 13 Oct 2010 17:25:42 +0100 Subject: [PATCH] Ensure attributed are updated when settings change. This fixes a bug where changign a binding via the menu did not update the actual bindings that were set on frames --- BindConfig.lua | 6 +++++- Clique.lua | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/BindConfig.lua b/BindConfig.lua index 008ba5b..fd79c1a 100755 --- a/BindConfig.lua +++ b/BindConfig.lua @@ -407,7 +407,10 @@ function CliqueConfig:AcceptSetBinding() -- This was a CHANGE binding instead of a SET binding dialog.binding.key = key dialog.binding = nil + -- Do not forget to update the attributes as well self:UpdateList() + addon:UpdateAttributes() + addon:UpdateGlobalAttributes() else local succ, err = addon:AddBinding{ key = key, @@ -430,8 +433,9 @@ local function toggleSet(binding, set) else binding.sets[set] = true end - addon:UpdateAttributes() CliqueConfig:UpdateList() + addon:UpdateAttributes() + addon:UpdateGlobalAttributes() end end diff --git a/Clique.lua b/Clique.lua index a3d8ed9..93c1ad7 100755 --- a/Clique.lua +++ b/Clique.lua @@ -422,6 +422,7 @@ function addon:AddBinding(entry) table.insert(self.bindings, entry) self:UpdateAttributes() + return true end @@ -455,6 +456,7 @@ function addon:DeleteBinding(entry) -- Update the attributes self:UpdateAttributes() + self:UpdateGlobalAttributes() end function addon:ClearAttributes() -- 1.7.9.5