Quantcast

In ListFrame:Update(): If num_entries is 0, call self:ClearLines() - we may have switched to a profession where nothing shows.

James D. Callahan III [03-31-10 - 11:24]
In ListFrame:Update(): If num_entries is 0, call self:ClearLines() - we may have switched to a profession where nothing shows.
Filename
Frame.lua
diff --git a/Frame.lua b/Frame.lua
index 1a41356..b0490a1 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -3007,14 +3007,15 @@ do
 	end

 	function ListFrame:Update(expand_mode, refresh)
-		-- If not refreshing an existing list and not scrolling up/down, wipe and re-initialize the entries.
-		if not refresh and not self.scrolling then
+		if not refresh then
 			self:Initialize(expand_mode)
 		end

 		local num_entries = #self.entries

 		if num_entries == 0 then
+			self:ClearLines()
+
 			-- disable expand button, it's useless here and would spam the same error again
 			ARL_ExpandButton:SetNormalFontObject("GameFontDisableSmall")
 			ARL_ExpandButton:Disable()