mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 06:13:14 -07:00
fixed UpdateIsDecimalEnabled
This commit is contained in:
parent
3409ad0af1
commit
4ffca0cd04
1 changed files with 3 additions and 2 deletions
|
@ -177,7 +177,7 @@ void UnitConverterViewModel::ResetCategory()
|
|||
IsCurrencyLoadingVisible = m_IsCurrencyCurrentCategory && !m_isCurrencyDataLoaded;
|
||||
IsDropDownEnabled = m_Units->GetAt(0) != EMPTY_UNIT;
|
||||
|
||||
IsDecimalEnabled = true;
|
||||
UpdateIsDecimalEnabled();
|
||||
|
||||
UnitChanged->Execute(nullptr);
|
||||
}
|
||||
|
@ -873,7 +873,8 @@ void UnitConverterViewModel::UpdateCurrencyFormatter()
|
|||
void UnitConverterViewModel::UpdateIsDecimalEnabled()
|
||||
{
|
||||
if (!IsCurrencyCurrentCategory || CurrencyFormatterFrom == nullptr)
|
||||
return;
|
||||
IsDecimalEnabled = true;
|
||||
else
|
||||
IsDecimalEnabled = CurrencyFormatterFrom->FractionDigits > 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue