TxInfoDialog: ensure it is closed

This commit is contained in:
tobtoht 2021-10-21 19:56:40 +02:00
parent 6c87a6a141
commit ddb78db5b5
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -666,9 +666,10 @@ void MainWindow::onTransactionCommitted(bool status, PendingTransaction *tx, con
if (msgBox.clickedButton() == showDetailsButton) {
this->showHistoryTab();
TransactionInfo *txInfo = m_ctx->wallet->history()->transaction(txid.first());
TxInfoDialog dialog{m_ctx, txInfo, this};
connect(&dialog, &TxInfoDialog::resendTranscation, this, &MainWindow::onResendTransaction);
dialog.exec();
auto *dialog = new TxInfoDialog(m_ctx, txInfo, this);
connect(dialog, &TxInfoDialog::resendTranscation, this, &MainWindow::onResendTransaction);
dialog->show();
dialog->setAttribute(Qt::WA_DeleteOnClose);
}
m_sendWidget->clearFields();