Disable ok button when it is not visible.

Otherwise it was possible to close the window before all cleanup is done
and later crash the program.
This commit is contained in:
Andrius Štikonas 2018-04-13 16:05:13 +03:00
parent c0385aca3c
commit 200bb23b67
1 changed files with 2 additions and 0 deletions

View File

@ -143,6 +143,7 @@ void ApplyProgressDialog::show()
dialogWidget().treeTasks().clear();
okButton->setVisible(false);
okButton->setEnabled(false);
cancelButton->setVisible(true);
cancelButton->setEnabled(true);
@ -244,6 +245,7 @@ void ApplyProgressDialog::allOpsDone(const QString& msg)
dialogWidget().progressTotal().setValue(operationRunner().numJobs());
cancelButton->setVisible(false);
okButton->setVisible(true);
okButton->setEnabled(true);
detailsWidget().buttonSave().setEnabled(true);
detailsWidget().buttonBrowser().setEnabled(true);
timer().stop();