1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-01 16:39:30 +02:00

fix for bug 584

This commit is contained in:
v.audacity 2013-05-11 03:29:15 +00:00
parent 6dd69e47fa
commit 483d723a5d
3 changed files with 13 additions and 5 deletions

View File

@ -737,6 +737,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
mMixerBoardFrame(NULL),
mFreqWindow(NULL),
mToolManager(NULL),
mbBusyImporting(false),
mAudioIOToken(-1),
mIsDeleting(false),
mTracksFitVerticallyZoomed(false), //lda
@ -1819,16 +1820,17 @@ void AudacityProject::OnMouseEvent(wxMouseEvent & event)
// and/or attempts to delete objects twice.
void AudacityProject::OnCloseWindow(wxCloseEvent & event)
{
if (event.CanVeto() && (::wxIsBusy() || mbBusyImporting))
{
event.Veto();
return;
}
if (mFreqWindow) {
mFreqWindow->Destroy();
mFreqWindow = NULL;
}
if (wxIsBusy()) {
event.Veto();
return;
}
// Check to see if we were playing or recording
// audio, and if so, make sure Audio I/O is completely finished.
// The main point of this is to properly push the state

View File

@ -492,6 +492,7 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
bool mShowSplashScreen;
wxString mHelpPref;
wxString mSoloPref;
bool mbBusyImporting; // used to fix bug 584
void SetNormalizedWindowState(wxRect pSizeAndLocation) { mNormalizedWindowState = pSizeAndLocation; }
wxRect GetNormalizedWindowState() const { return mNormalizedWindowState; }

View File

@ -327,6 +327,9 @@ int Importer::Import(wxString fName,
Tags *tags,
wxString &errorMessage)
{
AudacityProject *pProj = GetActiveProject();
pProj->mbBusyImporting = true;
ImportFileHandle *inFile = NULL;
int numTracks = 0;
@ -670,6 +673,8 @@ int Importer::Import(wxString fName,
errorMessage.Printf(_("Audacity recognized the type of the file '%s'.\nImporters supposedly supporting such files are:\n%s,\nbut none of them understood this file format."),fName.c_str(), pluglist.c_str());
}
pProj->mbBusyImporting = false;
return 0;
}