Skip to content

Commit 3e5fd26

Browse files
committed
Fix invalid input display
1 parent 92d43c1 commit 3e5fd26

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Calculator.ViewModels/StandardCalculatorViewModel.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,11 @@ private string GetNarratorStringReadRawNumbers(string localizedDisplayValue)
11461146

11471147
private void DisplayPasteError()
11481148
{
1149-
_standardCalculatorManager?.SendCommand(CalculatorCommand.CommandCLEAR);
1149+
// Displays the localized "Invalid input" string and sets error state.
1150+
const int IDS_ERRORS_FIRST = 99;
1151+
const int IDS_DOMAIN = IDS_ERRORS_FIRST + 1;
1152+
string errorString = _resourceProvider.GetCEngineString(IDS_DOMAIN.ToString());
1153+
SetPrimaryDisplay(errorString, true);
11501154
}
11511155

11521156
private void SetNoParenAddedNarratorAnnouncement()

0 commit comments

Comments
 (0)