diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-12-10 12:01:54 +0100 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-12-11 14:40:31 +0100 |
commit | 24646ee76f060a4590d074e80aebeb6665cb5ae1 (patch) | |
tree | adac39b01968f65e88a61974bbb377447dd08897 /src/qt | |
parent | 69127034c3018630d790ba462b070b9219c5d790 (diff) |
[Qt] fix possibilty to delete last sendcoins entry
- hide the entry about to be deleted, and if it is the last entry add a
new one, so that we always have one entry in our list
Diffstat (limited to 'src/qt')
-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 0a4e80811f..03cf7f51ea 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) { |