From 7496a6e4abd13867c31d093f18b443287a18fad9 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Thu, 25 Mar 2010 10:22:25 -0400 Subject: [PATCH] In MainPanel.scroll_frame:InsertEntry(): Added "parent_entry" parameter - assigns the parent to the new entry, and assigns the entry as a child. --- Frame.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Frame.lua b/Frame.lua index e746e85..fa57f27 100644 --- a/Frame.lua +++ b/Frame.lua @@ -2631,11 +2631,21 @@ do -- necessary to ensure each is counted only once. local recipe_registry = {} - function MainPanel.scroll_frame:InsertEntry(entry, entry_index, entry_type, entry_expanded, expand_acquires) + function MainPanel.scroll_frame:InsertEntry(entry, parent_entry, entry_index, entry_type, entry_expanded, expand_acquires) local insert_index = entry_index entry.type = entry_type + if parent_entry then + entry.parent = parent_entry + parent_entry.children = parent_entry.children or {} + + table.insert(parent_entry.children, entry) + + elseif entry.type ~= "header" then + addon:Debug("Non-header entry without a parent: %s - %s", entry.type, entry.text) + end + -- If we have acquire information for this entry, push the data table into the list -- and start processing the acquires. if expand_acquires then -- 1.7.9.5