Steps to reproduce:
- A Bitcoin address is in your address book and it has an associated label.
- You click on a Bitcoin URI referencing that address (such as "bitcoin:<address>?amount=<amount>").
- The URI is opened by the Bitcoin-QT client and the payment form is filled in using the specified address and amount.
- The Label field in the payment form is populated from the URI; if no label is specified in the URI, the field is left empty.
- After making the payment, the address label in your address book is overwritten (if the URI contained a label) or deleted (if the URI contained no label).
Fix:
- When opening a Bitcoin URI, if the referenced address is already present in the address book, don't overwrite or delete it.
Note: This happens both for labeled addresses in the address book and for labeled receiving addresses.