Skip to content

Commit

Permalink
[Qt] Fill in label from address book also for URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
cozz committed Mar 12, 2014
1 parent 1725e6a commit 0fde3bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/qt/sendcoinsentry.cpp
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 0fde3bb

Please sign in to comment.