From eefedd6a93b168b36a3bb9b597d41d1c842bd2d0 Mon Sep 17 00:00:00 2001 From: Parnic Date: Sat, 16 Oct 2010 15:43:57 +0000 Subject: [PATCH] - only create the fontstring for upper/lower text if it doesn't already exist. (sigh, garbage generation) --- IceBarElement.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/IceBarElement.lua b/IceBarElement.lua index b2591d7..ae7ab41 100644 --- a/IceBarElement.lua +++ b/IceBarElement.lua @@ -921,8 +921,12 @@ end function IceBarElement.prototype:CreateTexts() - self.frame.bottomUpperText = self:FontFactory(self.moduleSettings.barFontSize, nil, self.frame.bottomUpperText) - self.frame.bottomLowerText = self:FontFactory(self.moduleSettings.barFontSize, nil, self.frame.bottomLowerText) + if not self.frame.bottomUpperText then + self.frame.bottomUpperText = self:FontFactory(self.moduleSettings.barFontSize, nil, self.frame.bottomUpperText) + end + if not self.frame.bottomLowerText then + self.frame.bottomLowerText = self:FontFactory(self.moduleSettings.barFontSize, nil, self.frame.bottomLowerText) + end -- Parnic - commented these out so that they conform to whatever width the string is set to -- self.frame.bottomUpperText:SetWidth(80)