Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit edad915

Browse files
committed
restart timer when active while changing the interval
1 parent 0971628 commit edad915

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Libs/libMacGitverCore/Widgets/ProgressDlg.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ int ProgressDlg::updateInterval() const
6868

6969
void ProgressDlg::setUpdateInterval(int msec)
7070
{
71-
mUpdater.setInterval(msec);
71+
if (mUpdater.isActive()) {
72+
// restart timer with the new interval
73+
mUpdater.start(msec);
74+
}
75+
else {
76+
mUpdater.setInterval(msec);
77+
}
7278
}
7379

7480
void ProgressDlg::addActivity(const QString& description, QObject* activity,

0 commit comments

Comments
 (0)