Bugzilla – Bug 1845
Deletion of all tracks cannot be undone
Last modified: 2018-08-20 11:45:57 UTC
See steps to reproduce. This is a regression against 2.2.2. The bug is particularly pernicious if the "Auto Select" option is enabled, as the user could delete their entire project with just one slip of the mouse, with no obvious way to Undo. Explanation: When the final track is deleted, "tracksCopy" is empty, so the deletion does not get pushed onto the Undo stack. Same happens when deleting a track with the track [X] button. I can hack around the problem by checking that the number of tracks > 0, (and that solves the problem), but I'm unclear about what Paul is trying to do with the test: if (current >= 0 && tags == stack[current]->state.tags && tracksCopy->empty())
Fixed at https://github.com/audacity/audacity/commit/6d687136aadea1f872f519c19330623d660a4621
(In reply to Paul L from comment #1) Tested on W10 nightly Audacity 2-3-0 20180227-70 the "Remove Tracks" is now shown in the Undo history and the Undo now works to restore the track(s)
Tested on macOS 10.13.3 High Sierra with audacity-macos-nightly-2.3.0-4474dec Just as on Windows: the "Remove Tracks" is now shown in the Undo history and the Undo now works to restore the track(s)