From c0e950612d063f1a701e7fa70c56f66c844ba0ec Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Tue, 19 Feb 2019 15:06:51 -0800 Subject: [PATCH] #102 - Show import dialog first --- src/mainwindow.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4e71390..c064191 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -648,10 +648,6 @@ void MainWindow::doImport(QList* keys) { if (keys->isEmpty()) { delete keys; - - QMessageBox::information(this, - "Imported", tr("The keys were imported. It may take several minutes to rescan the blockchain. Until then, functionality may be limited"), - QMessageBox::Ok); ui->statusBar->showMessage(tr("Private key import rescan finished")); return; } @@ -784,7 +780,12 @@ void MainWindow::importPrivKey() { }); // Start the import. The function takes ownership of keys - doImport(keys); + QTimer::singleShot(1, [=]() {doImport(keys);}); + + // Show the dialog that keys will be imported. + QMessageBox::information(this, + "Imported", tr("The keys were imported. It may take several minutes to rescan the blockchain. Until then, functionality may be limited"), + QMessageBox::Ok); } }