Updated the focus state when the KGF Back Button is pressed to go to the EquationEditBox for the previously analyzed function. (#1141)
This commit is contained in:
parent
b93fe0b2b2
commit
2705bef6e9
@ -167,24 +167,17 @@ void EquationInputArea::FocusEquationTextBox(EquationViewModel ^ equation)
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto container = EquationInputList->ContainerFromIndex(index);
|
||||
if (container == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto equationTextBox = dynamic_cast<EquationTextBox ^>(container);
|
||||
if (equationTextBox != nullptr)
|
||||
{
|
||||
equationTextBox->FocusTextBox();
|
||||
}
|
||||
else
|
||||
auto container = static_cast<UIElement ^>(EquationInputList->ContainerFromIndex(index));
|
||||
if (container != nullptr)
|
||||
{
|
||||
container->StartBringIntoView();
|
||||
|
||||
auto equationInput = VisualTree::FindDescendantByName(container, "EquationInputButton");
|
||||
if (equationInput == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
equationTextBox = dynamic_cast<EquationTextBox ^>(equationInput);
|
||||
auto equationTextBox = dynamic_cast<EquationTextBox ^>(equationInput);
|
||||
if (equationTextBox != nullptr)
|
||||
{
|
||||
equationTextBox->FocusTextBox();
|
||||
|
@ -39,6 +39,8 @@ public
|
||||
|
||||
static Windows::UI::Xaml::Media::SolidColorBrush
|
||||
^ ToSolidColorBrush(Windows::UI::Color color) { return ref new Windows::UI::Xaml::Media::SolidColorBrush(color); }
|
||||
|
||||
void FocusEquationTextBox(ViewModel::EquationViewModel ^ equation);
|
||||
private:
|
||||
void OnPropertyChanged(Platform::String ^ propertyName);
|
||||
void OnEquationsPropertyChanged();
|
||||
@ -51,7 +53,6 @@ public
|
||||
|
||||
void OnHighContrastChanged(Windows::UI::ViewManagement::AccessibilitySettings ^ sender, Platform::Object ^ args);
|
||||
void ReloadAvailableColors(bool isHighContrast, bool reassignColors);
|
||||
void FocusEquationTextBox(ViewModel::EquationViewModel ^ equation);
|
||||
void OnColorValuesChanged(Windows::UI::ViewManagement::UISettings ^ sender, Platform::Object ^ args);
|
||||
|
||||
void EquationTextBox_RemoveButtonClicked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
|
||||
|
@ -458,7 +458,7 @@ void GraphingCalculator::OnEquationKeyGraphFeaturesRequested(Object ^ sender, Eq
|
||||
void GraphingCalculator::OnKeyGraphFeaturesClosed(Object ^ sender, RoutedEventArgs ^ e)
|
||||
{
|
||||
IsKeyGraphFeaturesVisible = false;
|
||||
ViewModel->SelectedEquation->GraphEquation->IsSelected = false;
|
||||
EquationInputAreaControl->FocusEquationTextBox(ViewModel->SelectedEquation);
|
||||
}
|
||||
|
||||
Visibility GraphingCalculator::ShouldDisplayPanel(bool isSmallState, bool isEquationModeActivated, bool isGraphPanel)
|
||||
|
Loading…
Reference in New Issue
Block a user