Fixed memory leak in Runes modules

We were creating font factories every time the runes module was asked to redraw. Oops...
Also fixed the numeric frame's parent while I was in there so that it (in a future commit) will show and hide with the module properly.
This commit is contained in:
Parnic
2016-10-12 21:01:03 -05:00
parent 152a3898a7
commit ed0dee1e08

View File

@ -344,7 +344,9 @@ end
function Runes.prototype:CreateRuneFrame()
-- create numeric runes
self.frame.numeric = self:FontFactory(self.moduleSettings.runeFontSize, nil, self.frame.numeric)
if not self.frame.numeric then
self.frame.numeric = self:FontFactory(self.moduleSettings.runeFontSize, self.frame)
end
self.frame.numeric:SetWidth(50)
self.frame.numeric:SetJustifyH("CENTER")