diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-04-13 21:08:46 +0200 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-04-16 09:18:06 -0400 |
commit | e2ce6438a971d8cd22912c6ea831b9801c4a9a92 (patch) | |
tree | 66f56d05ae2060b69668abd58fb1adb1abc2c522 /src | |
parent | e73b792b1af9d9d747bac81a27d16020ed393905 (diff) | |
download | bitcoin-e2ce6438a971d8cd22912c6ea831b9801c4a9a92.tar.xz |
Set label when selecting an address that already has a label. Fixes #1080.
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/sendcoinsentry.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index caffaaeff2..c8242d8352 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -59,9 +59,11 @@ void SendCoinsEntry::on_payTo_textChanged(const QString &address) { if(!model) return; - // Fill in label from address book, if no label is filled in yet - if(ui->addAsLabel->text().isEmpty()) - ui->addAsLabel->setText(model->getAddressTableModel()->labelForAddress(address));} + // Fill in label from address book, if address has an associated label + QString associatedLabel = model->getAddressTableModel()->labelForAddress(address); + if(!associatedLabel.isEmpty()) + ui->addAsLabel->setText(associatedLabel); +} void SendCoinsEntry::setModel(WalletModel *model) { |