diff options
| author | Wladimir J. van der Laan <[email protected]> | 2012-04-13 21:08:46 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2012-04-13 21:08:46 +0200 |
| commit | 2d67195ed20f9af013430f0f73fd9277fa5577b2 (patch) | |
| tree | a1a984702ad762d78965b734f3ef01cff29c071b /src/qt/sendcoinsentry.cpp | |
| parent | Add missing tooltip and key shortcut in settings dialog (#1088 without line b... (diff) | |
| download | discoin-2d67195ed20f9af013430f0f73fd9277fa5577b2.tar.xz discoin-2d67195ed20f9af013430f0f73fd9277fa5577b2.zip | |
Set label when selecting an address that already has a label. Fixes #1080.
Diffstat (limited to 'src/qt/sendcoinsentry.cpp')
| -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 caffaaeff..c8242d835 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) { |