From e38d492822a82fc9f1324f9e08c6ff0627321511 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sun, 6 May 2012 08:14:19 +0200 Subject: [PATCH 1/2] Hide UI immediately after leaving the main loop. Prevents it from seeming to hang during shutdown if shutdown is triggered while the window is open. --- src/qt/bitcoin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index b7c8a45d725..3157eadef85 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -205,6 +205,7 @@ int main(int argc, char *argv[]) app.exec(); + window.hide(); guiref = 0; } Shutdown(NULL); From 293f2644ffd98742caa30b16405b95a6420e8ba0 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Thu, 3 May 2012 14:52:15 +0200 Subject: [PATCH 2/2] fix #952 by checking if we have a new address or an updated label --- src/qt/walletmodel.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index f028f10f6c6..710d3aa0adf 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -152,14 +152,20 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QListcs_wallet) { - if (!wallet->mapAddressBook.count(strAddress)) - wallet->SetAddressBookName(strAddress, rcp.label.toStdString()); + std::map::iterator mi = wallet->mapAddressBook.find(strAddress); + + // Check if we have a new address or an updated label + if (mi == wallet->mapAddressBook.end() || mi->second != strLabel) + { + wallet->SetAddressBookName(strAddress, strLabel); + } } }