Fix crash when tabbing through KGF (#1037)

* Check readonly

* Update src/Calculator/Controls/MathRichEditBox.cpp

Co-Authored-By: Rudy Huyn <rudyhuyn@gmail.com>

Co-authored-by: Rudy Huyn <rudyhuyn@gmail.com>
This commit is contained in:
Pepe Rivera
2020-02-14 15:01:43 -08:00
committed by GitHub
parent 11ab829b1b
commit 8483b68f12

View File

@@ -110,9 +110,12 @@ void MathRichEditBox::SetMathTextProperty(String ^ newValue)
} }
void CalculatorApp::Controls::MathRichEditBox::OnLosingFocus(Windows::UI::Xaml::UIElement ^ sender, Windows::UI::Xaml::Input::LosingFocusEventArgs ^ args) void CalculatorApp::Controls::MathRichEditBox::OnLosingFocus(Windows::UI::Xaml::UIElement ^ sender, Windows::UI::Xaml::Input::LosingFocusEventArgs ^ args)
{
if (!this->IsReadOnly)
{ {
SubmitEquation(EquationSubmissionSource::FOCUS_LOST); SubmitEquation(EquationSubmissionSource::FOCUS_LOST);
} }
}
void CalculatorApp::Controls::MathRichEditBox::OnKeyUp(Platform::Object ^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs ^ e) void CalculatorApp::Controls::MathRichEditBox::OnKeyUp(Platform::Object ^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs ^ e)
{ {