From 9c36d93329eaa4b992571cb9bb9fc66a4ef77aa9 Mon Sep 17 00:00:00 2001 From: tian-lt Date: Tue, 15 Jun 2021 10:49:02 +0800 Subject: [PATCH] fixes: GraphingNumber doesn't work correctly --- src/Calculator/Controls/MathRichEditBox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Calculator/Controls/MathRichEditBox.cs b/src/Calculator/Controls/MathRichEditBox.cs index 23966eb3..ce642790 100644 --- a/src/Calculator/Controls/MathRichEditBox.cs +++ b/src/Calculator/Controls/MathRichEditBox.cs @@ -137,7 +137,7 @@ namespace CalculatorApp // If the rich edit has content already, then the mathzone will already be created due to mathonly mode being set and the selection will exist inside the // math zone. To handle this, we will force a math zone to be created in teh case of the text being empty and then replacing the text inside of the math // zone with the newly inserted text. - if (GetMathTextProperty() == null) + if (string.IsNullOrEmpty(GetMathTextProperty())) { SetMathTextProperty("x"); TextDocument.Selection.StartPosition = 0;