Quantcast

Added some debugging for slot filtering.

pschifferer [05-10-09 - 05:18]
Added some debugging for slot filtering.
Filename
CauldronMainUI.lua
diff --git a/CauldronMainUI.lua b/CauldronMainUI.lua
index 8e6788f..444115b 100644
--- a/CauldronMainUI.lua
+++ b/CauldronMainUI.lua
@@ -1681,9 +1681,7 @@ function Cauldron:InvSlotDropDown_Initialize(level)
 end

 function Cauldron:SlotsFilterAllCheck()
---@alpha@
 	self:debug("SlotsFilterAllCheck enter");
---@end-alpha@

 	local skillName = CURRENT_TRADESKILL;
 	if IsTradeSkillLinked() then
@@ -1696,48 +1694,37 @@ function Cauldron:SlotsFilterAllCheck()
 		for name, _ in pairs(Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots) do
 			if Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots[name] then
 				checked = false;
+				self:debug("breaking from slot check");
 				break;
 			end
 		end
 	end

---@alpha@
 	self:debug("SlotsFilterAllCheck exit");
---@end-alpha@

 	return checked;
 end

 function Cauldron:InvSlotDropDown_SetSlot(info)
---@alpha@
 	self:debug("InvSlotDropDown_SetSlot enter");
---@end-alpha@

 	local skillName = CURRENT_TRADESKILL;
 	if IsTradeSkillLinked() then
 		skillName = "Linked-"..skillName;
 	end

---@alpha@
 	self:debug("InvSlotDropDown_SetSlot: info.arg1="..info.arg1);
---@end-alpha@

 	if info.arg1 == "all" then
---@alpha@
 		self:debug("InvSlotDropDown_SetSlot: selecting all slots...");
---@end-alpha@
 		Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots["(none)"] = true;
 		for name, _ in pairs(Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots) do
---@alpha@
 			self:debug("InvSlotDropDown_SetSlot: name="..name);
---@end-alpha@
 			Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots[name] = true;
 		end
 	elseif info.arg1 == "none" then
---@alpha@
 		self:debug("InvSlotDropDown_SetSlot: selecting special 'none' slot...");
---@end-alpha@
-		local slotName = "(none)";
+		local slotName = "(None)";
 		if not Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots[slotName] then
 			Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots[slotName] = true;
 		else
@@ -1752,9 +1739,7 @@ function Cauldron:InvSlotDropDown_SetSlot(info)
 		end
 	end

---@alpha@
 	self:debug("InvSlotDropDown_SetSlot exit");
---@end-alpha@
 end

 function Cauldron:CategoryDropDown_Initialize(level)