Advertisement
Infus

Untitled

Jul 26th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. commit 2822648f943af985cbc9fc16f929759ba3df33ba
  2. Author: Infus <infus@squorn.de>
  3. Date: Tue Jul 26 15:15:12 2016 +0200
  4.  
  5. Hack
  6.  
  7. diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua
  8. index 652707c..884349b 100644
  9. --- a/WeakAuras/WeakAuras.lua
  10. +++ b/WeakAuras/WeakAuras.lua
  11. @@ -866,7 +866,14 @@ function WeakAuras.UpdateCurrentInstanceType(instanceType)
  12. end
  13. end
  14.  
  15. +function WeakAuras.massModifyHack(enable)
  16. + WeakAuras.delayMassModify = enable;
  17. +end
  18. +
  19. function WeakAuras.ScanForLoads(self, event, arg1)
  20. + if (WeakAuras.delayMassModify) then
  21. + return;
  22. + end
  23. -- PET_BATTLE_CLOSE fires twice at the end of a pet battle. IsInBattle evaluates to TRUE during the
  24. -- first firing, and FALSE during the second. I am not sure if this check is necessary, but the
  25. -- following IF statement limits the impact of the PET_BATTLE_CLOSE event to the second one.
  26. diff --git a/WeakAurasOptions/WeakAurasOptions.lua b/WeakAurasOptions/WeakAurasOptions.lua
  27. index baa1c04..660fa83 100644
  28. --- a/WeakAurasOptions/WeakAurasOptions.lua
  29. +++ b/WeakAurasOptions/WeakAurasOptions.lua
  30. @@ -1635,6 +1635,7 @@ local function getAll(data, info, ...)
  31. end
  32.  
  33. local function setAll(data, info, ...)
  34. + WeakAuras.massModifyHack(true);
  35. for index, childId in ipairs(data.controlledChildren) do
  36. local childData = WeakAuras.GetData(childId);
  37. if(childData) then
  38. @@ -1654,6 +1655,9 @@ local function setAll(data, info, ...)
  39. end
  40. end
  41. end
  42. + WeakAuras.massModifyHack(false);
  43. + WeakAuras.ScanForLoads();
  44. + WeakAuras.SortDisplayButtons();
  45. end
  46.  
  47. local function hiddenAll(data, info)
  48. @@ -8518,6 +8522,9 @@ end
  49.  
  50. local previousFilter;
  51. function WeakAuras.SortDisplayButtons(filter, overrideReset)
  52. + if (WeakAuras.delayMassModify) then
  53. + return;
  54. + end
  55. local recenter = false;
  56. filter = filter or (overrideReset and previousFilter or "");
  57. if(frame.filterInput:GetText() ~= filter) then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement