From 1acd7a8cd9d26aca5d51f91fbb41acf89dde8376 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Thu, 25 Mar 2010 05:10:22 -0400 Subject: [PATCH] In ListItem_OnClick(): When clicking on an expanded entry/subentry, check for headers AND subheaders - checking for one or the other will delete things it shouldn't. --- Frame.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Frame.lua b/Frame.lua index 1a71a49..5fde3e0 100644 --- a/Frame.lua +++ b/Frame.lua @@ -2503,18 +2503,17 @@ do else -- This is an expanded entry. Back up in the list of buttons until we find its header line. local entries = MainPanel.scroll_frame.entries - local check_type = clicked_line.type == "entry" and "header" or "subheader" traverseIndex = clickedIndex - 1 - while entries[traverseIndex] and entries[traverseIndex].type ~= check_type do + while entries[traverseIndex] and entries[traverseIndex].type ~= "header" and entries[traverseIndex].type ~= "subheader" do traverseIndex = traverseIndex - 1 end entries[traverseIndex].is_expanded = false traverseIndex = traverseIndex + 1 -- Remove the expanded lines until we get to a header/subheader. - while entries[traverseIndex] and entries[traverseIndex].type ~= check_type do + while entries[traverseIndex] and entries[traverseIndex].type ~= "header" and entries[traverseIndex].type ~= "subheader" do ReleaseTable(table.remove(entries, traverseIndex)) if not entries[traverseIndex] then -- 1.7.9.5