Fix analyze button being enabled with error (#1061)
This commit is contained in:
		@@ -74,7 +74,7 @@ void EquationTextBox::OnApplyTemplate()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (m_richEditContextMenu != nullptr)
 | 
					    if (m_richEditContextMenu != nullptr)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        m_richEditContextMenu->Opening += ref new EventHandler<Platform::Object ^>(this, &EquationTextBox::OnRichEditMenuOpening);
 | 
					        m_richEditContextMenu->Opened += ref new EventHandler<Platform::Object ^>(this, &EquationTextBox::OnRichEditMenuOpened);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (m_deleteButton != nullptr)
 | 
					    if (m_deleteButton != nullptr)
 | 
				
			||||||
@@ -344,11 +344,11 @@ bool EquationTextBox::RichEditHasContent()
 | 
				
			|||||||
    return !text->IsEmpty();
 | 
					    return !text->IsEmpty();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void EquationTextBox::OnRichEditMenuOpening(Object ^ /*sender*/, Object ^ /*args*/)
 | 
					void EquationTextBox::OnRichEditMenuOpened(Object ^ /*sender*/, Object ^ /*args*/)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (m_kgfEquationMenuItem != nullptr)
 | 
					    if (m_kgfEquationMenuItem != nullptr)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        m_kgfEquationMenuItem->IsEnabled = m_HasFocus && RichEditHasContent();
 | 
					        m_kgfEquationMenuItem->IsEnabled = m_HasFocus && !HasError && RichEditHasContent();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (m_colorChooserMenuItem != nullptr)
 | 
					    if (m_colorChooserMenuItem != nullptr)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -58,7 +58,7 @@ namespace CalculatorApp
 | 
				
			|||||||
            void OnRemoveButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
 | 
					            void OnRemoveButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
 | 
				
			||||||
            void OnColorChooserButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
 | 
					            void OnColorChooserButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
 | 
				
			||||||
            void OnFunctionButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
 | 
					            void OnFunctionButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
 | 
				
			||||||
            void OnRichEditMenuOpening(Platform::Object ^ sender, Platform::Object ^ args);
 | 
					            void OnRichEditMenuOpened(Platform::Object ^ sender, Platform::Object ^ args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            void OnColorFlyoutOpened(Platform::Object ^ sender, Platform::Object ^ e);
 | 
					            void OnColorFlyoutOpened(Platform::Object ^ sender, Platform::Object ^ e);
 | 
				
			||||||
            void OnColorFlyoutClosed(Platform::Object ^ sender, Platform::Object ^ e);
 | 
					            void OnColorFlyoutClosed(Platform::Object ^ sender, Platform::Object ^ e);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user