Changeset View
Changeset View
Standalone View
Standalone View
src/qt/addresstablemodel.cpp
Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | bool AddressTableModel::setData(const QModelIndex &index, const QVariant &value, | ||||
if (!index.isValid()) return false; | if (!index.isValid()) return false; | ||||
AddressTableEntry *rec = | AddressTableEntry *rec = | ||||
static_cast<AddressTableEntry *>(index.internalPointer()); | static_cast<AddressTableEntry *>(index.internalPointer()); | ||||
std::string strPurpose = | std::string strPurpose = | ||||
(rec->type == AddressTableEntry::Sending ? "send" : "receive"); | (rec->type == AddressTableEntry::Sending ? "send" : "receive"); | ||||
editStatus = OK; | editStatus = OK; | ||||
if (role == Qt::EditRole) { | if (role == Qt::EditRole) { | ||||
/* For SetAddressBook / DelAddressBook */ | LOCK(wallet->cs_wallet); /* For SetAddressBook / DelAddressBook */ | ||||
LOCK(wallet->cs_wallet); | |||||
CTxDestination curAddress = | CTxDestination curAddress = | ||||
DecodeDestination(rec->address.toStdString()); | DecodeDestination(rec->address.toStdString()); | ||||
if (index.column() == Label) { | if (index.column() == Label) { | ||||
// Do nothing, if old label == new label | // Do nothing, if old label == new label | ||||
if (rec->label == value.toString()) { | if (rec->label == value.toString()) { | ||||
editStatus = NO_CHANGES; | editStatus = NO_CHANGES; | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines |