mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 17:09:26 +02:00
fix for bug 584
This commit is contained in:
parent
6dd69e47fa
commit
483d723a5d
@ -737,6 +737,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
|||||||
mMixerBoardFrame(NULL),
|
mMixerBoardFrame(NULL),
|
||||||
mFreqWindow(NULL),
|
mFreqWindow(NULL),
|
||||||
mToolManager(NULL),
|
mToolManager(NULL),
|
||||||
|
mbBusyImporting(false),
|
||||||
mAudioIOToken(-1),
|
mAudioIOToken(-1),
|
||||||
mIsDeleting(false),
|
mIsDeleting(false),
|
||||||
mTracksFitVerticallyZoomed(false), //lda
|
mTracksFitVerticallyZoomed(false), //lda
|
||||||
@ -1819,16 +1820,17 @@ void AudacityProject::OnMouseEvent(wxMouseEvent & event)
|
|||||||
// and/or attempts to delete objects twice.
|
// and/or attempts to delete objects twice.
|
||||||
void AudacityProject::OnCloseWindow(wxCloseEvent & event)
|
void AudacityProject::OnCloseWindow(wxCloseEvent & event)
|
||||||
{
|
{
|
||||||
|
if (event.CanVeto() && (::wxIsBusy() || mbBusyImporting))
|
||||||
|
{
|
||||||
|
event.Veto();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mFreqWindow) {
|
if (mFreqWindow) {
|
||||||
mFreqWindow->Destroy();
|
mFreqWindow->Destroy();
|
||||||
mFreqWindow = NULL;
|
mFreqWindow = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wxIsBusy()) {
|
|
||||||
event.Veto();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check to see if we were playing or recording
|
// Check to see if we were playing or recording
|
||||||
// audio, and if so, make sure Audio I/O is completely finished.
|
// audio, and if so, make sure Audio I/O is completely finished.
|
||||||
// The main point of this is to properly push the state
|
// The main point of this is to properly push the state
|
||||||
|
@ -492,6 +492,7 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
|||||||
bool mShowSplashScreen;
|
bool mShowSplashScreen;
|
||||||
wxString mHelpPref;
|
wxString mHelpPref;
|
||||||
wxString mSoloPref;
|
wxString mSoloPref;
|
||||||
|
bool mbBusyImporting; // used to fix bug 584
|
||||||
|
|
||||||
void SetNormalizedWindowState(wxRect pSizeAndLocation) { mNormalizedWindowState = pSizeAndLocation; }
|
void SetNormalizedWindowState(wxRect pSizeAndLocation) { mNormalizedWindowState = pSizeAndLocation; }
|
||||||
wxRect GetNormalizedWindowState() const { return mNormalizedWindowState; }
|
wxRect GetNormalizedWindowState() const { return mNormalizedWindowState; }
|
||||||
|
@ -327,6 +327,9 @@ int Importer::Import(wxString fName,
|
|||||||
Tags *tags,
|
Tags *tags,
|
||||||
wxString &errorMessage)
|
wxString &errorMessage)
|
||||||
{
|
{
|
||||||
|
AudacityProject *pProj = GetActiveProject();
|
||||||
|
pProj->mbBusyImporting = true;
|
||||||
|
|
||||||
ImportFileHandle *inFile = NULL;
|
ImportFileHandle *inFile = NULL;
|
||||||
int numTracks = 0;
|
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());
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user