aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletcontroller.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-22 21:32:51 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-22 22:04:27 +0300
commit4935ac583bbdc289dd31a1caae3d711edef742b6 (patch)
treeeebabb6c2aaafc55893c5f35ea00c35b29bb8839 /src/qt/walletcontroller.cpp
parent75850106aeecfed1d2dc16d8a67ec210c5826a47 (diff)
downloadbitcoin-4935ac583bbdc289dd31a1caae3d711edef742b6.tar.xz
qt: Improve GUI responsiveness
QProgressDialog estimates the time the operation will take (based on time for steps), and only shows itself if that estimate is beyond minimumDuration. The default minimumDuration value is 4 seconds, and it could make users think that the GUI is frozen.
Diffstat (limited to 'src/qt/walletcontroller.cpp')
-rw-r--r--src/qt/walletcontroller.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp
index c152689f0b..aa26a01541 100644
--- a/src/qt/walletcontroller.cpp
+++ b/src/qt/walletcontroller.cpp
@@ -207,6 +207,9 @@ void WalletControllerActivity::showProgressDialog(const QString& label_text)
m_progress_dialog->setCancelButton(nullptr);
m_progress_dialog->setWindowModality(Qt::ApplicationModal);
GUIUtil::PolishProgressDialog(m_progress_dialog);
+ // The setValue call forces QProgressDialog to start the internal duration estimation.
+ // See details in https://bugreports.qt.io/browse/QTBUG-47042.
+ m_progress_dialog->setValue(0);
}
void WalletControllerActivity::destroyProgressDialog()