mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
allow multiple units in bitcoin amount widget (for example, for sending) using a combobox
This commit is contained in:
@@ -36,7 +36,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
|
||||
case ProxyPort:
|
||||
return QVariant(QString::fromStdString(addrProxy.ToStringPort()));
|
||||
case Fee:
|
||||
return QVariant(QString::fromStdString(FormatMoney(nTransactionFee)));
|
||||
return QVariant(nTransactionFee);
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
@@ -104,16 +104,8 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
||||
}
|
||||
break;
|
||||
case Fee: {
|
||||
int64 retval;
|
||||
if(ParseMoney(value.toString().toStdString(), retval))
|
||||
{
|
||||
nTransactionFee = retval;
|
||||
walletdb.WriteSetting("nTransactionFee", nTransactionFee);
|
||||
}
|
||||
else
|
||||
{
|
||||
successful = false; // Parse error
|
||||
}
|
||||
nTransactionFee = value.toLongLong();
|
||||
walletdb.WriteSetting("nTransactionFee", nTransactionFee);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user