Merge pull request #3855

0fde3bb [Qt] Fill in label from address book also for URIs (Cozz Lovan)
This commit is contained in:
Wladimir J. van der Laan 2014-03-18 09:03:42 +01:00
commit 61774f82b3
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with 4 additions and 2 deletions

View File

@ -195,8 +195,10 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value)
ui->messageTextLabel->setVisible(!recipient.message.isEmpty());
ui->messageLabel->setVisible(!recipient.message.isEmpty());
ui->payTo->setText(recipient.address);
ui->addAsLabel->setText(recipient.label);
ui->addAsLabel->clear();
ui->payTo->setText(recipient.address); // this may set a label from addressbook
if (!recipient.label.isEmpty()) // if a label had been set from the addressbook, dont overwrite with an empty label
ui->addAsLabel->setText(recipient.label);
ui->payAmount->setValue(recipient.amount);
}
}