Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 1845 - Deletion of all tracks cannot be undone
Deletion of all tracks cannot be undone
Status: RESOLVED QUICKFIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
2.3.0
Per OS All
: P2 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-25 15:03 UTC by Steve Daulton
Modified: 2018-08-20 11:45 UTC (History)
4 users (show)

See Also:
Steps To Reproduce:
1) Record a track 2) Tracks > Remove Tracks Note that "Remove Tracks" is not in the Undo history
Release Note:
First Git SHA: https://github.com/audacity/audacity/commit/43776f52
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
stevethefiddle: Regression+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+
stevethefiddle: Test‑OK‑Lin+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2018-02-25 15:03:35 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())
Comment 2 Peter Sampson 2018-02-27 05:27:14 UTC
(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)
Comment 3 Peter Sampson 2018-02-28 09:22:30 UTC
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)