mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 22:23:29 -07:00
Fixes: GraphingNumber doesn't work correctly (#1585)
* fixes: GraphingNumber doesn't work correctly * Avoid crashing
This commit is contained in:
parent
ae5d6c6f95
commit
cc8f8b44c4
4 changed files with 5 additions and 5 deletions
|
@ -159,7 +159,7 @@ namespace CalculatorApp
|
|||
// For very first launch, set the size of the calc as size of the default standard mode
|
||||
if (!localSettings.Values.ContainsKey("VeryFirstLaunch"))
|
||||
{
|
||||
localSettings.Values.Add("VeryFirstLaunch", false);
|
||||
localSettings.Values["VeryFirstLaunch"] = false;
|
||||
appView.SetPreferredMinSize(minWindowSize);
|
||||
appView.TryResizeView(minWindowSize);
|
||||
}
|
||||
|
|
|
@ -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("<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mi>x</mi></math>");
|
||||
TextDocument.Selection.StartPosition = 0;
|
||||
|
|
|
@ -129,7 +129,7 @@ namespace CalculatorApp
|
|||
{
|
||||
string propertyName = isMatchAppTheme ? "IsMatchAppTheme" : "IsAlwaysLightTheme";
|
||||
ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings;
|
||||
localSettings.Values.Add("IsGraphThemeMatchApp", isMatchAppTheme);
|
||||
localSettings.Values["IsGraphThemeMatchApp"] = isMatchAppTheme;
|
||||
GraphThemeSettingChanged?.Invoke(this, isMatchAppTheme);
|
||||
CalculatorApp.ViewModel.Common.TraceLogger.GetInstance().LogGraphSettingsChanged(GraphSettingsType.Theme, propertyName);
|
||||
}
|
||||
|
|
|
@ -463,8 +463,8 @@ namespace CalculatorApp
|
|||
if (m_model.IsAlwaysOnTop)
|
||||
{
|
||||
ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings;
|
||||
localSettings.Values.Add(ApplicationViewModel.WidthLocalSettings, ActualWidth);
|
||||
localSettings.Values.Add(ApplicationViewModel.HeightLocalSettings, ActualHeight);
|
||||
localSettings.Values[ApplicationViewModel.WidthLocalSettings] = ActualWidth;
|
||||
localSettings.Values[ApplicationViewModel.HeightLocalSettings] = ActualHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue