forked from mia/Aegisub
Don't report a user cancel when the user clicks on the 'Close' button after completion in the progress dialog
Originally committed to SVN as r5761.
This commit is contained in:
parent
1364527681
commit
f875938ee4
1 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ void DialogProgress::Run(std::tr1::function<void(agi::ProgressSink*)> task, int
|
||||||
DialogProgressSink ps(this);
|
DialogProgressSink ps(this);
|
||||||
this->ps = &ps;
|
this->ps = &ps;
|
||||||
new TaskRunner(task, &ps, this, priority);
|
new TaskRunner(task, &ps, this, priority);
|
||||||
if (ShowModal())
|
if (!ShowModal())
|
||||||
throw agi::UserCancelException("Cancelled by user");
|
throw agi::UserCancelException("Cancelled by user");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ void DialogProgress::OnComplete(wxThreadEvent &evt) {
|
||||||
// close button
|
// close button
|
||||||
bool cancelled = ps->IsCancelled();
|
bool cancelled = ps->IsCancelled();
|
||||||
if (cancelled || log_output->IsEmpty())
|
if (cancelled || log_output->IsEmpty())
|
||||||
EndModal(cancelled);
|
EndModal(!cancelled);
|
||||||
else
|
else
|
||||||
cancel_button->SetLabelText(_("Close"));
|
cancel_button->SetLabelText(_("Close"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue