@@ -956,7 +956,7 @@ function NAP:GetElelementDataForAddon(addonName, info, bucketsWithinHistory, ove
956956 if not bucketsWithinHistory then
957957 local currentMetrics = snapshotOverrides .endMetrics ;
958958 local baselineMetrics = snapshotOverrides .startMetrics ;
959- for field , ms in pairs (msOptionFieldMap ) do
959+ for ms , field in pairs (msOptionFieldMap ) do
960960 data [field ] = (currentMetrics [ms ] or 0 ) - (baselineMetrics [ms ] or 0 );
961961 end
962962 else
@@ -1326,13 +1326,14 @@ function NAP:InitUI()
13261326 end
13271327
13281328 function display :OnShow ()
1329- UpdateAddOnMemoryUsage ()
1330- self :DoUpdate (true )
1331-
1329+ self .ProfilingDisabledWarning :SetShown (not C_AddOnProfiler .IsEnabled ())
13321330 if continuousUpdate then
13331331 self :SetScript (" OnUpdate" , self .OnUpdate )
13341332 end
1335- self .ProfilingDisabledWarning :SetShown (not C_AddOnProfiler .IsEnabled ())
1333+ RunNextFrame (function ()
1334+ UpdateAddOnMemoryUsage ()
1335+ end )
1336+ self :DoUpdate (true )
13361337 end
13371338
13381339 function display :OnHide ()
@@ -2227,6 +2228,7 @@ function NAP:InitUI()
22272228 display .ProfilingDisabledWarning = CreateFrame (" Frame" , nil , display )
22282229 do
22292230 local warning = display .ProfilingDisabledWarning
2231+ warning :Hide ()
22302232 warning :SetFrameLevel (500 )
22312233 warning :SetAllPoints (display .ScrollBox )
22322234 local warningText = warning :CreateFontString (nil , " OVERLAY" , " GameFontNormal" )
0 commit comments