1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-04 17:49:45 +02:00

Fix to ensure that Stop/Cancel button always takes effect

This commit is contained in:
tip2tail 2016-04-14 08:42:45 +01:00
parent 24df87bb4c
commit 2d59f65919

View File

@ -1675,5 +1675,15 @@ int TimerProgressDialog::Update(const wxString & message /*= wxEmptyString*/)
// what you have to do.
wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI | wxEVT_CATEGORY_USER_INPUT | wxEVT_CATEGORY_TIMER);
return eProgressSuccess;
// MY: Added this after the YieldFor to check we haven't changed the outcome based on buttons pressed...
int iReturn = eProgressSuccess;
if (mCancel)
{
iReturn = eProgressCancelled;
}
else if (mStop)
{
iReturn = eProgressStopped;
}
return iReturn;
}