Fixes ghost rendering artifacts when switching from Search tab to General tab.
After using the Search tab (Beta), the General tab creates a ghost effect when scrolling.
In RenderSearchResults (qui_gui.lua:2945-2949), orphaned frames aren't properly destroyed:
-- Clear previous child frames
for _, child in ipairs({content:GetChildren()}) do
child:Hide()
child:SetParent(nil) -- Orphans the frame but doesn't destroy it
endSetParent(nil) orphans frames but doesn't destroy them. These orphaned frames can still render in unexpected places, especially when:
- They were created inside a scroll frame
- The scroll position or stacking context changes
- The frame's strata/level wasn't reset
File: utils/qui_gui.lua (around line 2945, in RenderSearchResults)
Replace:
-- Clear previous child frames
for _, child in ipairs({content:GetChildren()}) do
child:Hide()
child:SetParent(nil)
endWith:
-- Clear previous child frames (move off-screen instead of orphaning)
for _, child in ipairs({content:GetChildren()}) do
child:Hide()
child:ClearAllPoints()
child:SetAlpha(0)
-- Move to hidden stash frame instead of nil parent
if not GUI._orphanStash then
GUI._orphanStash = CreateFrame("Frame", nil, UIParent)
GUI._orphanStash:Hide()
GUI._orphanStash:SetPoint("TOPLEFT", UIParent, "BOTTOMRIGHT", 10000, -10000)
end
child:SetParent(GUI._orphanStash)
end| Aspect | Implementation |
|---|---|
| Problem | SetParent(nil) orphans frames without destroying |
| Solution | Reparent to hidden stash frame instead |
| Target File | utils/qui_gui.lua |
| Function | RenderSearchResults (line ~2945) |
The fix ensures orphaned widgets are:
- Hidden (
Hide()) - Unanchored (
ClearAllPoints()) - Invisible (
SetAlpha(0)) - Reparented to a hidden off-screen container