From 670b805bb5d0836261836aeab1de161f8d6b1d59 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Thu, 25 Mar 2010 04:43:50 -0400 Subject: [PATCH] In MainPanel.scroll_frame.Update(): Changed the while loop to actually check the values rather than relying on "stayInLoop". --- Frame.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Frame.lua b/Frame.lua index ba6fe31..f118d47 100644 --- a/Frame.lua +++ b/Frame.lua @@ -2809,19 +2809,20 @@ do if num_entries > 0 then local button_index = 1 local string_index = button_index + _G.FauxScrollFrame_GetOffset(self) - local stayInLoop = true local display_lines = NUM_RECIPE_LINES if num_entries <= display_lines then display_lines = num_entries / 2 end _G.FauxScrollFrame_Update(self, num_entries, display_lines, 16) + addon:ClosePopups() + ARL_ExpandButton:SetNormalFontObject("GameFontNormalSmall") ARL_ExpandButton:Enable() -- Populate the buttons with new values - while stayInLoop do + while button_index <= NUM_RECIPE_LINES and string_index <= num_entries do local cur_state = self.state_buttons[button_index] local cur_entry = self.entries[string_index] @@ -2861,10 +2862,6 @@ do button_index = button_index + 1 string_index = string_index + 1 - - if button_index > NUM_RECIPE_LINES or string_index > num_entries then - stayInLoop = false - end end else -- disable expand button, it's useless here and would spam the same error again -- 1.7.9.5