Fix filter state being remembered.
Ackis [11-20-08 - 20:11]
Fix filter state being remembered.
diff --git a/ARLDataminer.rb b/ARLDataminer.rb
index 43e5b1c..5c710ab 100644
--- a/ARLDataminer.rb
+++ b/ARLDataminer.rb
@@ -1818,7 +1818,7 @@ $bosslist = [
]
$bosszonemap = {
- #"40 Tickets - Schematic: Steam Tonk Controller" => "",
+ "40 Tickets - Schematic: Steam Tonk Controller" => "Darkmoon Faire",
"Master Craftsman Omarion" => "Naxxaramas",
"Azure Ley-Whelp" => "The Oculus",
"Bloodaxe Raider" => "Blackrock Spire",
diff --git a/ARLFrame.lua b/ARLFrame.lua
index a1b6193..b4d547c 100644
--- a/ARLFrame.lua
+++ b/ARLFrame.lua
@@ -716,40 +716,31 @@ function addon.filterSwitch(val)
end
- local found = false
+ -- We have this toggled one way
+ if (ApplyFilterState[val]) then
- for i,j in pairs(ApplyFilterState) do
-
- -- We have this value in our filter state, so we're toggling it off again
- if (j == val) then
+ ApplyFilterState[val] = not ApplyFilterState[val]
- tremove(ApplyFilterState, j)
- found = true
- break
+ -- Hasn't been toggled
+ else
- end
+ ApplyFilterState[val] = true
end
- -- New filter we haven't played with before
- if (not found) then
-
- tinsert(ApplyFilterState, val)
-
- end
+ ARL_ApplyButton:SetNormalFontObject("GameFontDisableSmall")
+ ARL_ApplyButton:Disable()
- -- Make sure our apply button gets enabled if we have a different state than the original
+ for i,j in pairs(ApplyFilterState) do
- if (#ApplyFilterState ~= 0) then
+ if (j == true) then
- ARL_ApplyButton:SetNormalFontObject("GameFontNormalSmall")
- ARL_ApplyButton:Enable()
+ ARL_ApplyButton:SetNormalFontObject("GameFontNormalSmall")
+ ARL_ApplyButton:Enable()
+ break
- else
+ end
- ARL_ApplyButton:SetNormalFontObject("GameFontDisableSmall")
- ARL_ApplyButton:Disable()
-
end
end