For now, let it abort vertical scale zoom
(any mouse button in any tool, in the vertical ruler)
and horizontal zoom
(any mouse button in the zoom tool or right mouse button in the multi tool,
in the wave display)
Should any other drags be escapable too?
Time shifting? That would need some more work to restore initial state.
Otherwise the following assertion gets triggered:
../src/common/wincmn.cpp(3271): assert "!wxMouseCapture::IsInCaptureStack(this)" failed in CaptureMouse(): Recapturing the mouse in the same window?
Based on the fix provided for an identical assertion triggered elsewhere,
described here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765779
New project. New track. Generate sound -- do not cancel. Select all,
generate sound again -- this time, do cancel the progress dialog.
Undo, so you see one, empty track again. Save. Close. Reopen.
The cause of these orphans is different from the first case. The previous
commit is necessary but not sufficient to fix this.
This fixes the first of two related memory leak bugs:
New project. Make a new track. Select the track and use any generator, such
as white noise, specifying a long enough length that a progress dialog appears.
Cancel the progress dialog.
Save the project. Exit and restart Audacity. Reopen the project.
Orphans!
Also updated copyright comments. 1999-2015 rather than 1999-2011. Vaughan Johnson now listed as contributor to this file. 'et al' corrected to 'et alii'.
A 4hr track used to take about 20s to cut a few samples. This is now significantly improved, to around 3s. Leland did this by
(a) moving the size calculation to when we examine the undo history, so it isn't slowing down the edits.
(b) in size calculation, using sizes that are cached rather than going to disk to find the sizes.
(c) writing the autosave file which is to an FFIle to a string first, i.e. using XMLStringWriter as a buffer for XMLFileWriter.
Step (c) may also make autosave marginally safer, as the risk of a partially updated autosave file is reduced.
This gives us automated testing of building on linux, with each commit to github.com/audacity/audacity:master. The run takes about 10 mins and runs on an AWS instance.