changeset 65:556e075983a6

check for valid spell name when updating talent data
author Nenue
date Sat, 10 Sep 2016 19:08:19 -0400
parents 178d489f387c
children 41f367b832a2
files SkeletonKey/ActionTemplates.lua SkeletonKey/BindingsFrame.lua SkeletonKey/SkeletonKey.lua
diffstat 3 files changed, 19 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/SkeletonKey/ActionTemplates.lua	Fri Sep 09 11:40:53 2016 -0400
+++ b/SkeletonKey/ActionTemplates.lua	Sat Sep 10 19:08:19 2016 -0400
@@ -245,7 +245,8 @@
 kb.UpdateMacroInfo =  function()
   for index = 1, GetNumMacros() do
     local name = GetMacroInfo(index)
-    kb.SecureAttribute(KeyBinderMacro, "*macro_"..tostring(name), i)
+    kb.SecureAttribute(KeyBinderMacro, "*type-macro_"..tostring(name), 'macro')
+    kb.SecureAttribute(KeyBinderMacro, "*macro-macro_"..tostring(name), i)
   end
 end
 
--- a/SkeletonKey/BindingsFrame.lua	Fri Sep 09 11:40:53 2016 -0400
+++ b/SkeletonKey/BindingsFrame.lua	Sat Sep 10 19:08:19 2016 -0400
@@ -417,7 +417,7 @@
     end
   end
 
-  if not kb.db.showUI then
+  if InCombatLockdown() or not kb.db.showUI then
     print('---end of refresh')
     return
   end
@@ -618,11 +618,15 @@
       else
         profile.bindings[self.binding] = self.command
       end
-      profile.talents[talentName] = talentInfo
+      if talentName then
+        profile.talents[talentName] = talentInfo
+      end
     else
       profile.bindings[self.binding] = nil
       profile.bound[self.command] = nil
-      profile.talents[talentName] = nil
+      if talentName then
+        profile.talents[talentName] = nil
+      end
     end
   end
 
--- a/SkeletonKey/SkeletonKey.lua	Fri Sep 09 11:40:53 2016 -0400
+++ b/SkeletonKey/SkeletonKey.lua	Sat Sep 10 19:08:19 2016 -0400
@@ -156,11 +156,14 @@
 
   if db.showUI then
     db.showUI = false
-    kb:print('|cFFFFFF00KeyBinds|r trace, |cFFFF0000OFF|r.')
     kb:Hide()
   else
     db.showUI = true
-    kb:print('|cFFFFFF00KeyBinds|r trace, |cFF00FF00ON|r.')
+    if not InCombatLockdown() then
+      kb:print(L('Config frame opened.'))
+    else
+      kb:print(L('Config frame will open upon exiting combat.'))
+    end
   end
   kb.ui(true)
 end
@@ -274,6 +277,11 @@
 kb.ConfirmBindings = function()
   kb.ApplyAllBindings()
   kb.ui()
+  if #kb.pendingAttributes == 0 then
+    kb:print(L("Manual bindings update finished."))
+  else
+    kb:print(L("Manual update will complete upon exiting combat."))
+  end
 end
 
 --- post ADDON_LOADED