diff options
| author | Wladimir J. van der Laan <[email protected]> | 2013-12-11 15:10:04 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2013-12-11 15:10:21 +0100 |
| commit | 5e47c2b70a4cffa2de60d578ddd6b7767879c83f (patch) | |
| tree | adac39b01968f65e88a61974bbb377447dd08897 | |
| parent | Merge pull request #3379 (diff) | |
| parent | [Qt] fix possibilty to delete last sendcoins entry (diff) | |
| download | discoin-5e47c2b70a4cffa2de60d578ddd6b7767879c83f.tar.xz discoin-5e47c2b70a4cffa2de60d578ddd6b7767879c83f.zip | |
Merge pull request #3382
24646ee [Qt] fix possibilty to delete last sendcoins entry (Philip Kaufmann)
| -rw-r--r-- | src/qt/sendcoinsdialog.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 0a4e80811..03cf7f51e 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -306,12 +306,14 @@ void SendCoinsDialog::updateTabsAndLabels() void SendCoinsDialog::removeEntry(SendCoinsEntry* entry) { - entry->deleteLater(); + entry->hide(); - // If the last entry was removed add an empty one - if (!ui->entries->count()) + // If the last entry is about to be removed add an empty one + if (ui->entries->count() == 1) addEntry(); + entry->deleteLater(); + updateTabsAndLabels(); } @@ -543,7 +545,7 @@ void SendCoinsDialog::coinControlChangeChecked(int state) } // Coin Control: custom change address changed -void SendCoinsDialog::coinControlChangeEdited(const QString & text) +void SendCoinsDialog::coinControlChangeEdited(const QString& text) { if (model) { |