Merge pull request #1092 from laanwj/2012_04_sendcoins_setlabelfix

When sending coins, set label when selecting address that already has a label
pull/2/merge
Wladimir J. van der Laan 13 years ago
commit 7a5452ffb3

@ -59,9 +59,11 @@ void SendCoinsEntry::on_payTo_textChanged(const QString &address)
{ {
if(!model) if(!model)
return; return;
// Fill in label from address book, if no label is filled in yet // Fill in label from address book, if address has an associated label
if(ui->addAsLabel->text().isEmpty()) QString associatedLabel = model->getAddressTableModel()->labelForAddress(address);
ui->addAsLabel->setText(model->getAddressTableModel()->labelForAddress(address));} if(!associatedLabel.isEmpty())
ui->addAsLabel->setText(associatedLabel);
}
void SendCoinsEntry::setModel(WalletModel *model) void SendCoinsEntry::setModel(WalletModel *model)
{ {

Loading…
Cancel
Save