Skip to content

Commit 5e47c2b

Browse files
committed
Merge pull request #3382
24646ee [Qt] fix possibilty to delete last sendcoins entry (Philip Kaufmann)
2 parents 6912703 + 24646ee commit 5e47c2b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,14 @@ void SendCoinsDialog::updateTabsAndLabels()
306306

307307
void SendCoinsDialog::removeEntry(SendCoinsEntry* entry)
308308
{
309-
entry->deleteLater();
309+
entry->hide();
310310

311-
// If the last entry was removed add an empty one
312-
if (!ui->entries->count())
311+
// If the last entry is about to be removed add an empty one
312+
if (ui->entries->count() == 1)
313313
addEntry();
314314

315+
entry->deleteLater();
316+
315317
updateTabsAndLabels();
316318
}
317319

@@ -543,7 +545,7 @@ void SendCoinsDialog::coinControlChangeChecked(int state)
543545
}
544546

545547
// Coin Control: custom change address changed
546-
void SendCoinsDialog::coinControlChangeEdited(const QString & text)
548+
void SendCoinsDialog::coinControlChangeEdited(const QString& text)
547549
{
548550
if (model)
549551
{

0 commit comments

Comments
 (0)