diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-06 22:41:35 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-20 10:44:50 +0200 |
commit | 0832c0d1669a3504b7ec21d583aecc79f84e8506 (patch) | |
tree | 347838e641b27a89db7a8d065e18eab76b06a0c7 /src/wallet.cpp | |
parent | ab1b288fa7994db5f036e93d5f8ba73372017c40 (diff) |
Process address book updates incrementally
- No longer invalidates selection model, thus retains selection on address book changes
- Fixes selection of new address when added
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r-- | src/wallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 92ad8c0f10..d67cdf4b71 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1289,7 +1289,7 @@ bool CWallet::SetAddressBookName(const CBitcoinAddress& address, const string& s { std::map<CBitcoinAddress, std::string>::iterator mi = mapAddressBook.find(address); mapAddressBook[address] = strName; - NotifyAddressBookChanged(this, address.ToString(), strName, (mi == mapAddressBook.end()) ? CT_NEW : CT_UPDATED); + NotifyAddressBookChanged(this, address.ToString(), strName, HaveKey(address), (mi == mapAddressBook.end()) ? CT_NEW : CT_UPDATED); if (!fFileBacked) return false; return CWalletDB(strWalletFile).WriteName(address.ToString(), strName); @@ -1298,7 +1298,7 @@ bool CWallet::SetAddressBookName(const CBitcoinAddress& address, const string& s bool CWallet::DelAddressBookName(const CBitcoinAddress& address) { mapAddressBook.erase(address); - NotifyAddressBookChanged(this, address.ToString(), "", CT_DELETED); + NotifyAddressBookChanged(this, address.ToString(), "", HaveKey(address), CT_DELETED); if (!fFileBacked) return false; return CWalletDB(strWalletFile).EraseName(address.ToString()); |