Quantcast

Debugging.

pschifferer [02-24-09 - 06:14]
Debugging.
Filename
CauldronMainUI.lua
diff --git a/CauldronMainUI.lua b/CauldronMainUI.lua
index 3289218..1e9a324 100644
--- a/CauldronMainUI.lua
+++ b/CauldronMainUI.lua
@@ -771,9 +771,14 @@ function Cauldron:UpdateQueue()
 											 "CauldronQueueIntItem"..i,
 											 CauldronQueueFrameScrollFrameQueueSectionsSecondaryItems,
 											 "CauldronQueueItemFrameTemplate");
+			else
+				self:debug("use existing frame for item "..i..": "..queueInfo.name);
+
+				-- set the frame's parent
+				queueItemFrame:SetParent(CauldronQueueFrameScrollFrameQueueSectionsSecondaryItems);
 			end

-			queueItemFrame:SetID(i);
+			queueItemFrame:SetID(100 + i);
 			queueItemFrame.itemName = queueInfo.name;
 			queueItemFrame.removeable = false;
 			queueItemFrame.shoppable = false;
@@ -913,12 +918,17 @@ function Cauldron:UpdateQueue()
 										 "CauldronQueueReagentItem"..i,
 										 CauldronQueueFrameScrollFrameQueueSectionsReagents,
 										 "CauldronQueueItemFrameTemplate");
+	    else
+	    	self:debug("use existing frame for item "..i..": "..queueInfo.name);
+
+	    	-- set the frame's parent
+	    	queueItemFrame:SetParent(CauldronQueueFrameScrollFrameQueueSectionsReagents);
 		end

 		local countInfo = Cauldron:ReagentCount(queueInfo.name);
 		local need = math.max(0, queueInfo.amount - countInfo.has);

-		queueItemFrame:SetID(i);
+		queueItemFrame:SetID(200 + i);
 		queueItemFrame.skillIndex = queueInfo.skillIndex;
 		queueItemFrame.index = queueInfo.index;
 		queueItemFrame.itemName = queueInfo.name;