Apply local fixes on top of upstream: tracker desync/drag/title, map icon zoom offset
- Compat/HBD.lua: fix world map pin offset math to account for zoom addons (e.g. Magnify) rescaling an ancestor frame instead of WorldMapButton itself; cull pins that fall outside the scroll frame's viewport when zoomed - Compat/Compat.lua: add a short TTL to the chat-parsed objective progress cache so a stale entry can't be reapplied to an unrelated quest - Modules/QuestieLearner.lua: re-point QuestiePlayer.currentQuestlog at the rebuilt quest table after invalidating QuestieDB's quest cache, fixing Tracker freezing on stale objective progress - Modules/Tracker/QuestieTracker.lua: fall back to a formatted quest name when QuestieDB has no title for a quest (e.g. custom server quests) - Modules/Tracker/TrackerBaseFrame.lua: force baseFrame movability on drag start instead of trusting the async-refreshed IsMovable() state - Modules/Tracker/TrackerHeaderFrame.lua: wire up drag on the tracker icon - Modules/Quest/QuestEventHandler.lua: force a full quest log reconciliation when the native quest log is opened Squashed from prior commit-by-commit history to rebuild this working copy on a clean fork of aron-w/Questie-X (restores the native GitHub fork link). Per-fix rationale is preserved in project memory (project_tracker_fixes.md, project_map_icon_offset.md).
This commit is contained in:
@@ -1039,6 +1039,25 @@ function QuestieTracker:Update()
|
||||
(Questie.db.profile.collapseCompletedQuests and isMinimizable), false)
|
||||
end
|
||||
|
||||
if not coloredQuestName then
|
||||
-- QuestieDB has no "name" entry for this quest (e.g. a custom
|
||||
-- server quest not yet in the static DB), so GetColoredQuestName
|
||||
-- returned nil -- fall back instead of SetText(nil) blanking the
|
||||
-- title line while its objectives still render normally below it.
|
||||
-- Level/tag lookups don't require a DB "name" entry, so reuse the
|
||||
-- same formatting helper as the normal path to keep the "[level]"
|
||||
-- prefix consistent with quests that do have a DB name.
|
||||
local fallbackName = quest.name or tostring(quest.Id)
|
||||
if Questie.db.profile.trackerShowQuestLevel then
|
||||
local level = QuestieLib.GetTbcLevel(quest.Id)
|
||||
fallbackName = QuestieLib:GetQuestString(quest.Id, fallbackName, level, false)
|
||||
end
|
||||
if Questie.db.profile.enableTooltipsQuestID then
|
||||
fallbackName = fallbackName .. " (" .. quest.Id .. ")"
|
||||
end
|
||||
coloredQuestName = "|cFFFFFF00" .. fallbackName .. "|r"
|
||||
end
|
||||
|
||||
line.label:SetText(coloredQuestName)
|
||||
|
||||
-- Check and measure Quest Label text width and update tracker width
|
||||
|
||||
@@ -317,16 +317,17 @@ function TrackerBaseFrame.OnDragStart(frame, button)
|
||||
if TrackerBaseFrame.isMoving ~= true and TrackerBaseFrame.isSizing ~= true then
|
||||
if IsMouseButtonDown(button) and button ~= "MiddleButton" then
|
||||
if (IsControlKeyDown() and Questie.db.profile.trackerLocked and not ChatEdit_GetActiveWindow()) or not Questie.db.profile.trackerLocked then
|
||||
if baseFrame:IsMovable() then
|
||||
Questie:Debug(Questie.DEBUG_DEVELOP, "[TrackerBaseFrame:OnDragStart] - Dragging Started.")
|
||||
TrackerBaseFrame.isMoving = true
|
||||
TrackerBaseFrame.baseFrame.isMoving = true
|
||||
-- Force movability here instead of trusting baseFrame:IsMovable(), which is
|
||||
-- only refreshed asynchronously by TrackerBaseFrame:Update() on unrelated
|
||||
-- tracker events and is almost never in sync with the live Ctrl/lock state
|
||||
-- already checked above at the moment of an actual drag attempt.
|
||||
baseFrame:SetMovable(true)
|
||||
Questie:Debug(Questie.DEBUG_DEVELOP, "[TrackerBaseFrame:OnDragStart] - Dragging Started.")
|
||||
TrackerBaseFrame.isMoving = true
|
||||
TrackerBaseFrame.baseFrame.isMoving = true
|
||||
|
||||
baseFrame:StartMoving()
|
||||
TrackerBaseFrame:Update()
|
||||
else
|
||||
Questie:Debug(Questie.DEBUG_DEVELOP, "[TrackerBaseFrame:OnDragStart] - Frame is not movable!")
|
||||
end
|
||||
baseFrame:StartMoving()
|
||||
TrackerBaseFrame:Update()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -51,6 +51,9 @@ function TrackerHeaderFrame.Initialize(baseFrame)
|
||||
|
||||
questieIcon:EnableMouse(true)
|
||||
questieIcon:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
questieIcon:RegisterForDrag("LeftButton")
|
||||
questieIcon:SetScript("OnDragStart", TrackerBaseFrame.OnDragStart)
|
||||
questieIcon:SetScript("OnDragStop", TrackerBaseFrame.OnDragStop)
|
||||
|
||||
questieIcon:SetScript("OnClick", function(_, button)
|
||||
if button == "LeftButton" then
|
||||
|
||||
Reference in New Issue
Block a user