From 609acbf43d8d66102878e47a826c037edc270e46 Mon Sep 17 00:00:00 2001 From: Janne Pulkkinen Date: Tue, 27 Sep 2011 17:46:19 +0300 Subject: Send Coins page not cleared when changing tabs. Clear all button for clearing the entries --- src/qt/bitcoingui.cpp | 4 +++- src/qt/forms/sendcoinsdialog.ui | 24 ++++++++++++++++++++++-- src/qt/sendcoinsdialog.cpp | 1 + 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 3e6b547006..c9a892fd1d 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -525,7 +525,9 @@ void BitcoinGUI::gotoSendCoinsPage() if(centralWidget->currentWidget() != sendCoinsPage) { // Clear the current contents if we arrived from another tab - sendCoinsPage->clear(); + // Not necessary especially if the user is jumping between Transactions + // and Send Coins pages. - Matoking + //sendCoinsPage->clear(); } centralWidget->setCurrentWidget(sendCoinsPage); diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui index fb2fc99bfe..f9dd02fef5 100644 --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -25,7 +25,7 @@ 0 0 666 - 162 + 165 @@ -59,7 +59,7 @@ - 12 + 6 @@ -75,6 +75,26 @@ + + + + + 0 + 0 + + + + Clear all + + + + :/icons/remove:/icons/remove + + + 300 + + + diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 8954af4742..58eb5c21f7 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -22,6 +22,7 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) : addEntry(); connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addEntry())); + connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear())); } void SendCoinsDialog::setModel(WalletModel *model) -- cgit v1.2.3 From a1ef0d19b1c1dd30b49bba6b0036eea3414e6ef7 Mon Sep 17 00:00:00 2001 From: Janne Pulkkinen Date: Tue, 27 Sep 2011 19:20:24 +0300 Subject: Removing the if statement entirely - not needed. --- src/qt/bitcoingui.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index c9a892fd1d..be10b97c0f 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -522,13 +522,6 @@ void BitcoinGUI::gotoReceiveCoinsPage() void BitcoinGUI::gotoSendCoinsPage() { sendCoinsAction->setChecked(true); - if(centralWidget->currentWidget() != sendCoinsPage) - { - // Clear the current contents if we arrived from another tab - // Not necessary especially if the user is jumping between Transactions - // and Send Coins pages. - Matoking - //sendCoinsPage->clear(); - } centralWidget->setCurrentWidget(sendCoinsPage); exportAction->setEnabled(false); -- cgit v1.2.3