Keep spaces when users copy an error message (#430)
Verify if the StandardCalculatorViewModel::DisplayValue isn't an error message before removing group separators (including space character). How changes were validated: Tested in english and french Tested with "Cannot divide by zero" and "Result is undefined" Fixes #420
This commit is contained in:
parent
dcc731f111
commit
d8cb5c82a8
@ -1223,13 +1223,18 @@ void StandardCalculatorViewModel::SetCalculatorType(ViewMode targetState)
|
||||
}
|
||||
}
|
||||
|
||||
Platform::String ^ StandardCalculatorViewModel::GetRawDisplayValue()
|
||||
String^ StandardCalculatorViewModel::GetRawDisplayValue()
|
||||
{
|
||||
if (IsInError)
|
||||
{
|
||||
return DisplayValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
wstring rawValue;
|
||||
|
||||
LocalizationSettings::GetInstance().RemoveGroupSeparators(DisplayValue->Data(), DisplayValue->Length(), &rawValue);
|
||||
|
||||
return ref new Platform::String(rawValue.c_str());
|
||||
return ref new String(rawValue.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
// Given a format string, returns a string with the input display value inserted.
|
||||
|
Loading…
Reference in New Issue
Block a user