Fix pop bar refresh bug

Scott Yeskie [07-27-16 - 20:21]
Fix pop bar refresh bug

When refreshing the labels, there wouldn't be a texture, resulting in a solid block of color.
Filename
classes/ScoringBar.lua
diff --git a/classes/ScoringBar.lua b/classes/ScoringBar.lua
index 18bb508..7050978 100644
--- a/classes/ScoringBar.lua
+++ b/classes/ScoringBar.lua
@@ -61,6 +61,10 @@ function bar:update()
     self.ep_points = GetCampaignAlliancePotentialScore(self.campaign, EP)

     if CyrHUD.cfg.showPopBars then
+        self.ad_pop = GetSelectionCampaignPopulationData(self.campaignIndex, AD)
+        self.dc_pop = GetSelectionCampaignPopulationData(self.campaignIndex, DC)
+        self.ep_pop = GetSelectionCampaignPopulationData(self.campaignIndex, EP)
+
         -- Main update is every 5s
         -- Only refresh population bar data once every 3min
         slowUpdate = slowUpdate + 1
@@ -68,13 +72,6 @@ function bar:update()
             QueryCampaignSelectionData()
             slowUpdate = 0
         end
-
-        -- Delayed 1 cycle so the query data has time to come into effect
-        if slowUpdate == 1 then
-            self.ad_pop = GetSelectionCampaignPopulationData(self.campaignIndex, AD)
-            self.dc_pop = GetSelectionCampaignPopulationData(self.campaignIndex, DC)
-            self.ep_pop = GetSelectionCampaignPopulationData(self.campaignIndex, EP)
-        end
     end
 end