1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-04 09:39:42 +02:00

Merge pull request #122 from tip2tail/TimerRecordHotfix

Timer Record: Ensure that Stop/Cancel in progress dialog always works
This commit is contained in:
James Crook 2016-04-21 12:45:08 +01:00
commit 79a25b1401

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;
}