From ce4df65d44332682369161da4971029f47b9029a Mon Sep 17 00:00:00 2001 From: Michael Griebling Date: Mon, 16 Jan 2023 09:08:12 -0500 Subject: [PATCH] Fix MTLabel creation. --- Sources/SwiftMathRender/MathRender/MTMathUILabel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftMathRender/MathRender/MTMathUILabel.swift b/Sources/SwiftMathRender/MathRender/MTMathUILabel.swift index 7685cc1..3687d05 100644 --- a/Sources/SwiftMathRender/MathRender/MTMathUILabel.swift +++ b/Sources/SwiftMathRender/MathRender/MTMathUILabel.swift @@ -171,6 +171,7 @@ public class MTMathUILabel : MTView { } func initCommon() { + errorLabel = MTLabel() #if os(macOS) self.layer?.isGeometryFlipped = true errorLabel?.layer?.isGeometryFlipped = true @@ -179,7 +180,6 @@ public class MTMathUILabel : MTView { errorLabel?.layer.isGeometryFlipped = true #endif self.backgroundColor = MTColor.clear - errorLabel = MTLabel() errorLabel?.isHidden = true errorLabel?.textColor = MTColor.red self.addSubview(errorLabel!)