mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-20 21:33:10 -07:00
Fix equations not getting focus after being removed (#1271)
This commit is contained in:
parent
8f56ad0dc6
commit
81ea002cf9
1 changed files with 7 additions and 0 deletions
|
@ -236,6 +236,13 @@ void EquationInputArea::EquationTextBox_RemoveButtonClicked(Object ^ sender, Rou
|
|||
}
|
||||
|
||||
Equations->GetAt(lastIndex)->FunctionLabelIndex = m_lastFunctionLabelIndex;
|
||||
|
||||
// Focus the next equation after the one we just removed. There should always be at least one ghost equation,
|
||||
// but check to make sure that there is an equation we can focus in the index where we just removed an equation.
|
||||
if (index < Equations->Size)
|
||||
{
|
||||
FocusEquationTextBox(Equations->GetAt(index));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue