From a2313a3090b9e2039cadedb9a2089b5f7cd0d92d Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Sun, 28 Mar 2010 23:25:54 -0400 Subject: [PATCH] Remove the scrollbar if there aren't enough entries for scrolling. --- Frame.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Frame.lua b/Frame.lua index 0f00fdc..e859e7a 100644 --- a/Frame.lua +++ b/Frame.lua @@ -2908,10 +2908,14 @@ do if num_entries > 0 then local button_index = 1 local string_index = button_index + _G.FauxScrollFrame_GetOffset(self) - local display_lines = NUM_RECIPE_LINES + local scroll_bar = _G[self:GetName().."ScrollBar"] if num_entries > NUM_RECIPE_LINES then + scroll_bar:Show() _G.FauxScrollFrame_Update(self, num_entries, NUM_RECIPE_LINES, 16) + else + scroll_bar:SetValue(0) + scroll_bar:Hide() end addon:ClosePopups() -- 1.7.9.5