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;
|
return;
|
||||||
}
|
}
|
||||||
auto container = EquationInputList->ContainerFromIndex(index);
|
auto container = static_cast<UIElement ^>(EquationInputList->ContainerFromIndex(index));
|
||||||
if (container == nullptr)
|
if (container != nullptr)
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
auto equationTextBox = dynamic_cast<EquationTextBox ^>(container);
|
|
||||||
if (equationTextBox != nullptr)
|
|
||||||
{
|
|
||||||
equationTextBox->FocusTextBox();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
container->StartBringIntoView();
|
||||||
|
|
||||||
auto equationInput = VisualTree::FindDescendantByName(container, "EquationInputButton");
|
auto equationInput = VisualTree::FindDescendantByName(container, "EquationInputButton");
|
||||||
if (equationInput == nullptr)
|
if (equationInput == nullptr)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
equationTextBox = dynamic_cast<EquationTextBox ^>(equationInput);
|
auto equationTextBox = dynamic_cast<EquationTextBox ^>(equationInput);
|
||||||
if (equationTextBox != nullptr)
|
if (equationTextBox != nullptr)
|
||||||
{
|
{
|
||||||
equationTextBox->FocusTextBox();
|
equationTextBox->FocusTextBox();
|
||||||
|
@ -39,6 +39,8 @@ public
|
|||||||
|
|
||||||
static Windows::UI::Xaml::Media::SolidColorBrush
|
static Windows::UI::Xaml::Media::SolidColorBrush
|
||||||
^ ToSolidColorBrush(Windows::UI::Color color) { return ref new Windows::UI::Xaml::Media::SolidColorBrush(color); }
|
^ ToSolidColorBrush(Windows::UI::Color color) { return ref new Windows::UI::Xaml::Media::SolidColorBrush(color); }
|
||||||
|
|
||||||
|
void FocusEquationTextBox(ViewModel::EquationViewModel ^ equation);
|
||||||
private:
|
private:
|
||||||
void OnPropertyChanged(Platform::String ^ propertyName);
|
void OnPropertyChanged(Platform::String ^ propertyName);
|
||||||
void OnEquationsPropertyChanged();
|
void OnEquationsPropertyChanged();
|
||||||
@ -51,7 +53,6 @@ public
|
|||||||
|
|
||||||
void OnHighContrastChanged(Windows::UI::ViewManagement::AccessibilitySettings ^ sender, Platform::Object ^ args);
|
void OnHighContrastChanged(Windows::UI::ViewManagement::AccessibilitySettings ^ sender, Platform::Object ^ args);
|
||||||
void ReloadAvailableColors(bool isHighContrast, bool reassignColors);
|
void ReloadAvailableColors(bool isHighContrast, bool reassignColors);
|
||||||
void FocusEquationTextBox(ViewModel::EquationViewModel ^ equation);
|
|
||||||
void OnColorValuesChanged(Windows::UI::ViewManagement::UISettings ^ sender, Platform::Object ^ args);
|
void OnColorValuesChanged(Windows::UI::ViewManagement::UISettings ^ sender, Platform::Object ^ args);
|
||||||
|
|
||||||
void EquationTextBox_RemoveButtonClicked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
|
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)
|
void GraphingCalculator::OnKeyGraphFeaturesClosed(Object ^ sender, RoutedEventArgs ^ e)
|
||||||
{
|
{
|
||||||
IsKeyGraphFeaturesVisible = false;
|
IsKeyGraphFeaturesVisible = false;
|
||||||
ViewModel->SelectedEquation->GraphEquation->IsSelected = false;
|
EquationInputAreaControl->FocusEquationTextBox(ViewModel->SelectedEquation);
|
||||||
}
|
}
|
||||||
|
|
||||||
Visibility GraphingCalculator::ShouldDisplayPanel(bool isSmallState, bool isEquationModeActivated, bool isGraphPanel)
|
Visibility GraphingCalculator::ShouldDisplayPanel(bool isSmallState, bool isEquationModeActivated, bool isGraphPanel)
|
||||||
|
Loading…
Reference in New Issue
Block a user