Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv11534
Modified Files:
Project.cpp
Log Message:
Prevent recursion and exiting while Audacity is busy.
Index: Project.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v
retrieving revision 1.302
retrieving revision 1.303
diff -u -d -r1.302 -r1.303
--- Project.cpp 11 Apr 2007 06:07:18 -0000 1.302
+++ Project.cpp 20 Apr 2007 04:31:48 -0000 1.303
@@ -1315,7 +1315,7 @@
// and/or attempts to delete objects twice.
void AudacityProject::OnCloseWindow(wxCloseEvent & event)
{
- if (gPrefsDialogVisible) {
+ if (gPrefsDialogVisible || wxIsBusy()) {
event.Veto();
return;
}
@@ -1466,6 +1466,7 @@
for (mProgressCurrent = 2; mProgressCurrent >= 0; mProgressCurrent--) {
if (mProgressDialog[mProgressCurrent]) {
delete mProgressDialog[mProgressCurrent];
+ mProgressDialog[mProgressCurrent] = NULL;
}
}
@@ -3226,6 +3227,10 @@
mProgressDialog[mProgressCurrent] = NULL;
}
+ GetMenuBar()->Enable(false);
+ GetMenuBar()->Enable(wxID_ABOUT, false);
+ GetMenuBar()->Enable(wxID_PREFERENCES, false);
+ GetMenuBar()->Enable(wxID_EXIT, false);
wxStartTimer();
wxBeginBusyCursor();
wxSafeYield(this, true);
@@ -3240,6 +3245,11 @@
if (wxIsBusy()) {
wxEndBusyCursor();
}
+
+ GetMenuBar()->Enable(wxID_EXIT, true);
+ GetMenuBar()->Enable(wxID_PREFERENCES, true);
+ GetMenuBar()->Enable(wxID_ABOUT, true);
+ GetMenuBar()->Enable(true);
}
bool AudacityProject::ProgressUpdate(int value, const wxString &message)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs