Why is track deletion not part of undo history?

(Alex Fellows) #1

Is there a particular reason for this? It seems very odd to me that there are any actions at all that cannot be undone. There have been a number of times where I have worked on a track, done loads of automation and tweaked plugin settings, and then deleted it by mistake (selecting the wrong track). It’s just crazy that this can’t be undone, I know ardour warns about it but I don’t think it’s good enough.

(Paul Davis) #2

What can I say? Our undo/redo model only operates on existing objects, it does not delete or recreate objects. Almost all other edits in Ardour do not involve deleting objects - when you “delete” a Region, we actually do not delete the Region at all. We have no plans do do any fundamental re-engineering of the undo/redo model in the foreseeable future.

I suggest you just stop deleting tracks, which is not a lightweight or reversible operation. Mark them as inactive and hide them instead, if it’s really likely that you want to reverse this sort of decision.

(Julien "_FrnchFrgg_" RIVAUD) #3

Or maybe we should just have the delete menu entry deactivate+hide the track (within a single undoable command) so that it looks like it has been deleted. Maybe with a preference “delete track is deactivate and hide” somewhere ? This would enable matching expectations of some users, which probably don’t know the deactivate command anyway. This leaves the janitoring to solve UI-wise, though. Some “destroy deactivated+hidden tracks ?”.

I’m just throwing blunt ideas at this point…

(Seablade) #4


Problem there goes into track naming etc.

  • “Why can’t a new track have the same name as one I just deleted?”

  • “Why can’t Ardour/Jack create a port named X?”

  • “Why do these playlists and track still exist after I deleted them?”

(Alex Fellows) #5

I’m not sure what you mean by ‘keeping it around’. I get the impression that you are hinting that the resources would not freed up by the deletion if the details of the track were left in the undo history?
If it is mainly a case of it being a heavy operation to recreate the track I would expect that to necessarily be a bad thing, I think most people would find it reasonable to wait some time for it to be recreated if needed.
Ardour is the first music software I’ve used where this happens, Renoise, Qtractor, Bitwig, Ableton, Reason, (Cubase and Logic as far as I can remember), all allow undoing the deletion of a track. This is why I find it so unusual that Ardour doesn’t do this.

(Paul Davis) #6

it’s not crazy. deleting a track means removing a bunch of resources associated with it - particularly input and output ports, any plugins or other processors in use, disk i/o buffers and so on. Undo/Redo is generally a lightweight operation that just changes the state of existing objects, rather than delete/create them.

Although a track is not a particularly heavyweight object, it isn’t free either, and keeping one around just so that you can “undo” out of its deletion makes it a bit pointless to have deleted it in the first place. It would, in no time at all, lead to calls for a “no, really delete my deleted tracks”.

That leaves the undo operation as actually recreating the track in its previous state, which is totally at odds with undo/redo as a state changing operation for components that make up a session (tracks, regions, control data etc).

This is why we put up a warning dialog when you’re deleting a track, to make sure you’re clear on what you’re doing.