diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-04-16 05:41:39 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-04-16 05:41:39 -0700 |
commit | 7a5452ffb3075c0c2604a76e8e82c2c84a24e62e (patch) | |
tree | 37598a64b875699cad451fcc6a46d1b9d628dde9 /src | |
parent | 088a13331bd85a54a1cb39aeb8699a36c1e5de98 (diff) | |
parent | 2d67195ed20f9af013430f0f73fd9277fa5577b2 (diff) |
Merge pull request #1092 from laanwj/2012_04_sendcoins_setlabelfix
When sending coins, set label when selecting address that already has a label
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) { |