Bugzilla – Bug 826
Mis-handling of envelopes when split-deleting, or when cutting with cut lines enabled
Last modified: 2019-06-25 09:40:47 UTC
The fix might be entirely in Envelope::CollapseRegion. It is used in WaveClip::Clear and WaveClip::ClearAndAddCutLine and nowhere else.
Now I think there should be more to the fix than that. WaveTrack.cpp takes care to insert extra control points when needed for splitting of clips, deletion, and cut without cut lines. It neglects to do this in other cases. However, I think it should be the reponsibility of WaveClip::Clear() to do this. Such code should not be in WaveTrack in several places. So code should be removed from WaveTrack, and the three named correct cases should be verified as still correct, while the other cases are fixed.
PX->P4
Testing on W10 with audacity-2.3.3-alpha-271-d84ab5948d544eec6ba6a648d76d31ef9d5edc88 a) Step 2 is not now inconsistent - it produces the same result as Step 1 b) at Step 3 the envelope is properly restored c) at step 4 the envelope retains its proper shape either side of the split-cut d) Step 5 cannot be done as Cut (and Silence) buttons are grayed out and inoperable as are the shortcuts Ctrl+T and Ctrl+L - but that is a different issue to be logged separately This looks to be fixed for Windows
On macOS 10.14.5 with 2.3.3 alpha jc001 a) Step 2 is now fine b) Step 3 does not restore the envelope to its original state c) Step 4 is now OK - the envelope retains its proper shape either side of the split-cut d) Trim is available here and produces the correct expected result Step 3 will need re-testing when I get a more up to date alpha - this Mac alpha is several days older and many commits older that the Windows audacity-2.3.3-alpha-271-d84ab5948d544eec6ba6a648d76d31ef9d5edc88
(In reply to Peter Sampson from comment #4) Step d cannot be tested until Bug #2132 is fixed
(In reply to Peter Sampson from comment #6) Bug #2132 now works on Windows do Step 5 (d) can bed tested and the Trim (Ctrl+T) works OK as expected Retested other steps - all still OK
(In reply to Peter Sampson from comment #5) I retested on mac)S 10.14.5 with 2.3.3 alpha jc001 and now b) Step 3 does restore the envelope to its original state So all is well with this on Mac too I suspect that yesterday I omitted Step 2.1 - I did the same today when testing initially on W10 - that'ts the problen with mutiple sub-steps in a "step" - so today I teased out Step 2 to 2.1 and 2.2 for clarity