Update UI through async calls MainFrameRepaint and AddressBookRepaint instead of a timer.
- Overall, this is better design - This fixes problems with the address book UI not updating when the address book is changed through RPC - Move Statusbar change detection responsibility to ClientModel
This commit is contained in:
@@ -1279,6 +1279,7 @@ int CWallet::LoadWallet(bool& fFirstRunRet)
|
||||
bool CWallet::SetAddressBookName(const CBitcoinAddress& address, const string& strName)
|
||||
{
|
||||
mapAddressBook[address] = strName;
|
||||
AddressBookRepaint();
|
||||
if (!fFileBacked)
|
||||
return false;
|
||||
return CWalletDB(strWalletFile).WriteName(address.ToString(), strName);
|
||||
@@ -1287,6 +1288,7 @@ bool CWallet::SetAddressBookName(const CBitcoinAddress& address, const string& s
|
||||
bool CWallet::DelAddressBookName(const CBitcoinAddress& address)
|
||||
{
|
||||
mapAddressBook.erase(address);
|
||||
AddressBookRepaint();
|
||||
if (!fFileBacked)
|
||||
return false;
|
||||
return CWalletDB(strWalletFile).EraseName(address.ToString());
|
||||
|
||||
Reference in New Issue
Block a user