Mercurial > wow > worldplan
diff FilterBar.lua @ 84:a12f782571c5 v1.4.5
- Fixed more filter bar issues
author | Nenue |
---|---|
date | Mon, 10 Apr 2017 17:50:06 -0400 |
parents | 26d736fbfe67 |
children | 98b5e08b75ed |
line wrap: on
line diff
--- a/FilterBar.lua Mon Apr 10 17:29:46 2017 -0400 +++ b/FilterBar.lua Mon Apr 10 17:50:06 2017 -0400 @@ -107,6 +107,7 @@ function Module:Setup() print('|cFF00FF88'..self:GetName()..':Setup()') self.isStale = true + self:SetShown(true) end @@ -117,12 +118,15 @@ end end -function Module:OnMapInfo(isBrokenIsle, mapAreaID) +function Module:OnMapInfo(isBrokenIsle, isZoomedOut, mapAreaID, isNewMap, isMapOpen) + print('|cFFFFFF00OnMapInfo()', isBrokenIsle, isZoomedOut, mapAreaID, isNewMap, isMapOpen) if not isBrokenIsle then self:SetShown(false) else + if self:IsShown() then + self:Refresh() + end self:SetShown(true) - self:Refresh() end end @@ -191,17 +195,25 @@ local borderWidth = layout.iconWidth + (layout.borderWidth * 2) local highlightWidth = borderWidth + (layout.highlightWidth * 2) local mapQuests = db.QuestsByZone[db.currentMapID] or db.QuestsByID + local n = 0 + for _ in pairs(mapQuests) do + n = n + 1 + end + print(n, 'pins to work with') + local firstCvar, lastCvar for index, info in ipairs(self.filterList) do local numQuestsHere = 0 local numQuestsTotal = 0 info.questList = info.questList or {} wipe(info.questList) + print(info.filterKey, info.filterValue) for questID, pin in pairs(db.QuestsByID) do --print(pin.worldQuestType ~= LE_QUEST_TAG_TYPE_PROFESSION, (db.Config.ShowAllProfessionQuests or pin.isKnownProfession)) if pin.used then + print(pin.title, mapQuests[questID]) if (pin.worldQuestType ~= LE_QUEST_TAG_TYPE_PROFESSION) or (db.Config.ShowAllProfessionQuests or pin.isKnownProfession) then if not info.filterKey then @@ -210,7 +222,6 @@ end numQuestsTotal = numQuestsTotal + 1 elseif pin[info.filterKey] == info.filterValue then - print(pin.title, mapQuests[questID]) if mapQuests[questID] then numQuestsHere = numQuestsHere + 1 tinsert(info.questList, pin)