Keep spaces when users copy an error message

This commit is contained in:
Rudy Huyn 2019-04-03 23:34:32 -07:00
commit de97826e95

View file

@ -1326,13 +1326,18 @@ void StandardCalculatorViewModel::SetCalculatorType(ViewMode targetState)
}
}
Platform::String^ StandardCalculatorViewModel::GetRawDisplayValue()
String^ StandardCalculatorViewModel::GetRawDisplayValue()
{
wstring rawValue;
LocalizationSettings::GetInstance().RemoveGroupSeparators(DisplayValue->Data(), DisplayValue->Length(), &rawValue);
return ref new Platform::String(rawValue.c_str());
if (m_IsInError)
{
return DisplayValue;
}
else
{
wstring rawValue;
LocalizationSettings::GetInstance().RemoveGroupSeparators(DisplayValue->Data(), DisplayValue->Length(), &rawValue);
return ref new String(rawValue.c_str());
}
}
// Given a format string, returns a string with the input display value inserted.