Quantcast

last minute update

Steven Jackson [09-28-14 - 06:58]
last minute update
Filename
Interface/AddOns/SVUI/packages/stats/SVStats.lua
Interface/AddOns/SVUI/system/load.lua
Interface/AddOns/SVUI/system/moveable.lua
diff --git a/Interface/AddOns/SVUI/packages/stats/SVStats.lua b/Interface/AddOns/SVUI/packages/stats/SVStats.lua
index 73f1a31..42ea044 100644
--- a/Interface/AddOns/SVUI/packages/stats/SVStats.lua
+++ b/Interface/AddOns/SVUI/packages/stats/SVStats.lua
@@ -651,10 +651,13 @@ local function LoadStatBroker()
 	      	dataObj.OnClick(self, e)
 	    end;
 	    local CallBack = function(_, name, _, value, _)
-			if(value == nil or len(value) > 5 or value == "n / a" or name == value) then
-				lastObj.text:SetText(value ~= "n / a" and value or name)
-			else
-				lastObj.text:SetText(name..": "..hexString..value.."|r")
+	    	local newText;
+			if(value == nil or string.len(value) > 5 or value == "n / a" or name == value) then
+				newText = value ~= "n / a" and value or name
+				lastObj.text:SetText(newText)
+			else
+				newText = ("%s: %s%s|r"):format(name, hexString, value)
+				lastObj.text:SetText(newText)
 			end
 	    end;
 	    local OnEvent = function(self)
diff --git a/Interface/AddOns/SVUI/system/load.lua b/Interface/AddOns/SVUI/system/load.lua
index 5e86297..e273a06 100644
--- a/Interface/AddOns/SVUI/system/load.lua
+++ b/Interface/AddOns/SVUI/system/load.lua
@@ -190,6 +190,9 @@ local SVUISystem_OnEvent = function(self, event, arg, ...)
 			SV.Timers:RemoveLoop(SV.BGTimer)
 			SV.BGTimer = nil
 		end
+		if(not InCombatLockdown()) then
+			collectgarbage("collect")
+		end
 	elseif(event == "SPELLS_CHANGED") then
 		if (PlayerClass ~= "DRUID") then
 			self:UnregisterEvent("SPELLS_CHANGED")
diff --git a/Interface/AddOns/SVUI/system/moveable.lua b/Interface/AddOns/SVUI/system/moveable.lua
index 35152cb..93b44d4 100644
--- a/Interface/AddOns/SVUI/system/moveable.lua
+++ b/Interface/AddOns/SVUI/system/moveable.lua
@@ -158,8 +158,7 @@ local Movable_OnEvent = function(self)
 				MovableFrames[frameName] = {}
 			end
 		end
-	end
-	collectgarbage("collect")
+	end
 end

 Movable:RegisterEvent("PLAYER_LOGIN")