fix(map): completed quest pins stuck on world map until reload (#9)
Draw-queue race: ProcessQueue processes the world-map and minimap queues independently. When a frame was unloaded while still queued, its minimap-queue entry could trigger the deferred Unload first (removing both icons and clearing _needsUnload), then a later map-queue entry re-added the world-map icon -- orphaned, since Unload had nil'd the questIdFrames/_G reference, so it lingered until /reload while the minimap cleared. Unload now drops the frame's pending draw-queue entries (new QuestieMap:DequeueFrameDrawCalls) so an unloaded frame can never be re-added to a map.
This commit is contained in:
@@ -327,8 +327,15 @@ end
|
||||
function _Qframe:Unload()
|
||||
if not self._loaded then
|
||||
self._needsUnload = true
|
||||
-- Drop any pending draw-queue entries so this frame can't be re-added to a map
|
||||
-- after it was unloaded while still queued (see DequeueFrameDrawCalls). Without
|
||||
-- this a completed quest's world-map pin could linger until /reload. (#9)
|
||||
QuestieMap:DequeueFrameDrawCalls(self)
|
||||
return -- icon is still in the draw queue
|
||||
end
|
||||
-- Even when already loaded, the frame may have been re-queued for a redraw; clear those
|
||||
-- pending draw calls so they don't re-add the icon after this unload. (#9)
|
||||
QuestieMap:DequeueFrameDrawCalls(self)
|
||||
self._needsUnload = nil
|
||||
self._loaded = nil
|
||||
--Questie:Debug(Questie.DEBUG_SPAM, "[_Qframe:Unload]")
|
||||
|
||||
Reference in New Issue
Block a user