aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-06-21 20:34:43 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-06-21 20:36:03 +0200
commitb9e80983a5c076fed655a7c3c67b53bd9ecc3dda (patch)
tree8160290efeef086d82cd7b156a0538e922363ad8 /src/qt/bitcoingui.cpp
parentf5927f5b32c9e28033fb7a00dd43f3162781c1d0 (diff)
downloadbitcoin-b9e80983a5c076fed655a7c3c67b53bd9ecc3dda.tar.xz
Allow changing default address (fixes issue #6)
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 2dfcd40df3..bc986dcf9f 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -14,6 +14,7 @@
#include "editaddressdialog.h"
#include "optionsmodel.h"
#include "transactiondescdialog.h"
+#include "addresstablemodel.h"
#include "main.h"
@@ -188,8 +189,8 @@ void BitcoinGUI::setModel(ClientModel *model)
setNumBlocks(model->getNumBlocks());
connect(model, SIGNAL(numBlocksChanged(int)), this, SLOT(setNumBlocks(int)));
- setAddress(model->getAddress());
- connect(model, SIGNAL(addressChanged(QString)), this, SLOT(setAddress(QString)));
+ setAddress(model->getAddressTableModel()->getDefaultAddress());
+ connect(model->getAddressTableModel(), SIGNAL(defaultAddressChanged(QString)), this, SLOT(setAddress(QString)));
// Report errors from network/worker thread
connect(model, SIGNAL(error(QString,QString)), this, SLOT(error(QString,QString)));
@@ -329,11 +330,6 @@ void BitcoinGUI::newAddressClicked()
if(dlg.exec())
{
QString newAddress = dlg.saveCurrentRow();
- // Set returned address as new default addres
- if(!newAddress.isEmpty())
- {
- model->setAddress(newAddress);
- }
}
}