changeset 86:effb42f6fabd v1.4.6

- Fixed pins not returning to WorldMapFrame after the FlightMap is opened
author Nenue
date Mon, 10 Apr 2017 18:05:36 -0400
parents d3f36db572e5
children 7185905e4894
files FlightMap.lua WorldQuests.lua
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/FlightMap.lua	Mon Apr 10 17:50:16 2017 -0400
+++ b/FlightMap.lua	Mon Apr 10 18:05:36 2017 -0400
@@ -82,6 +82,7 @@
   local scale1, scale2, scale3 = unpack(db.Config.FlightMapScalingLimits)
 
   local mapAreaID = self:GetMap():GetMapID();
+  WorldPlanQuests.isStale = true
   for zoneIndex = 1, C_MapCanvas.GetNumZones(mapAreaID) do
     local zoneMapID, zoneName, zoneDepth, left, right, top, bottom = C_MapCanvas.GetZoneInfo(mapAreaID, zoneIndex);
     print(zoneMapID, zoneName)
@@ -113,14 +114,13 @@
                 frame.pin = pin
 
                 -- fix the scale
+                pin.owningFrame = frame:GetMap()
                 pin:SetAnchor(frame, nil, nil, nil, nil, 1)
-                pin.owningFrame = frame:GetMap()
                 pin.throttle = 1
                 pin:ClearAllPoints()
                 pin:SetPoint('CENTER', frame, 'CENTER')
                 --print(pin.Overlay:IsShown(), pin.Overlay:GetPoint(1))
               end
-              pin:SetShown(pin.used)
             end
 
           end
--- a/WorldQuests.lua	Mon Apr 10 17:50:16 2017 -0400
+++ b/WorldQuests.lua	Mon Apr 10 18:05:36 2017 -0400
@@ -268,7 +268,7 @@
 end
 
 function Module:OnMapInfo(isBrokenIsle, isZoomedOut, mapAreaID, isNewMap, isMapOpen)
-  if isNewMap then
+  if isNewMap or self.isStale then
     print('|cFF0088FFOnMapInfo()|r, mapAreaID =', mapAreaID,'visible =', isMapOpen, 'changed =', isNewMap)
     layoutDirty = true
     self:Refresh('WORLD_MAP_CHANGED')