Coins: fix description edit on multi-account wallets

This commit is contained in:
tobtoht
2021-10-23 22:42:49 +02:00
parent b431638b4d
commit 518fa831ae
5 changed files with 15 additions and 8 deletions
+9 -1
View File
@@ -179,9 +179,17 @@ bool CoinsModel::setData(const QModelIndex &index, const QVariant &value, int ro
if (index.isValid() && role == Qt::EditRole) {
const int row = index.row();
QString pubkey;
bool found = m_coins->coin(index.row(), [this, &pubkey](const CoinsInfo &cInfo) {
pubkey = cInfo.pubKey();
});
if (!found) {
return false;
}
switch (index.column()) {
case Label:
m_coins->setDescription(row, m_currentSubaddressAccount, value.toString());
m_coins->setDescription(pubkey, m_currentSubaddressAccount, value.toString());
emit descriptionChanged();
break;
default: