Make sure the scroll bar's OnValueChanged script doesn't try to update the list while the list is being initialized. Fixes ticket #1011.
James D. Callahan III [06-18-10 - 09:55]
Make sure the scroll bar's OnValueChanged script doesn't try to update the list while the list is being initialized. Fixes ticket #1011.
diff --git a/Frame.lua b/Frame.lua
index 2439a4c..4e351c5 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -2908,7 +2908,10 @@ do
ScrollUpButton:Enable()
ScrollDownButton:Enable()
end
- ListFrame:Update(nil, true)
+
+ if not ListFrame.initializing then
+ ListFrame:Update(nil, true)
+ end
end)
local function Button_OnEnter(self)
@@ -3102,6 +3105,8 @@ do
end
function ListFrame:Initialize(expand_mode)
+ self.initializing = true
+
for i = 1, #self.entries do
ReleaseTable(self.entries[i])
end
@@ -3140,6 +3145,7 @@ do
else
progress_bar.text:SetFormattedText("%s", L["NOT_YET_SCANNED"])
end
+ self.initializing = nil
end
-- Reset the current buttons/lines