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

Fixes bug #1172 and removes fix for bug #334

The issue described by #334 doesn't appear to be a problem with
wx3 and it was causing an issue with focus.
This commit is contained in:
Leland Lucius 2015-09-02 23:15:19 -05:00
parent ac5d204e70
commit eabe014551

View File

@ -3268,6 +3268,20 @@ void AudacityProject::UnlockAllBlocks()
}
}
#if 0
// I added this to "fix" bug #334. At that time, we were on wxWidgets 2.8.12 and
// there was a window between the closing of the "Save" progress dialog and the
// end of the actual save where the user was able to close the project window and
// recursively enter the Save code (where they could inadvertently cause the issue
// described in #334).
//
// When we converted to wx3, this "disabler" caused focus problems when returning
// to the project after the save (bug #1172) because the focus and activate events
// weren't being dispatched and the focus would get lost.
//
// After some testing, it looks like the window described above no longer exists,
// so I've disabled the disabler. However, I'm leaving it here in case we run
// into the problem in the future. (even though it can't be used as-is)
class ProjectDisabler
{
public:
@ -3283,12 +3297,14 @@ public:
private:
wxWindow *mWindow;
};
#endif
bool AudacityProject::Save(bool overwrite /* = true */ ,
bool fromSaveAs /* = false */,
bool bWantSaveCompressed /*= false*/)
{
ProjectDisabler disabler(this);
// See explanation above
// ProjectDisabler disabler(this);
if (bWantSaveCompressed)
wxASSERT(fromSaveAs);