Not undoing layout changes when undoing edits

This read-only archive contains discussions from the Adding Feature forum.
New feature request may be posted to the Adding Feature forum.
Technical support is available via the Help forum.
Locked
h-h
Posts: 110
Joined: Tue Jul 28, 2015 2:37 am
Operating System: Please select

Not undoing layout changes when undoing edits

Post by h-h » Mon Aug 03, 2015 12:24 am

Hello,

as for now Audacity undoes layout changes when undoing an edit. E.g., it could be that a previous track height is restored. That should be changed. I would suggest to have two undo/redo lists: one for edits, one for layout.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Not undoing layout changes when undoing edits

Post by Gale Andrews » Mon Aug 03, 2015 3:07 pm

Thank you for your suggestion which is noted. Having more than one undo stack is a significant change, but generally I agree there are cases where undo should not change selections/track selectedness/focus or purely visual states.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Not undoing layout changes when undoing edits

Post by steve » Mon Aug 03, 2015 3:18 pm

h-h wrote: I would suggest to have two undo/redo lists: one for edits, one for layout.
As Gale wrote, that would be a very big change. In addition, I think that it could be highly problematic in some circumstances. The main problem that comes to mind is that the two lists could easily become desynchronised.

Perhaps an alternative approach could be for the normal Undo command (Ctrl+Z) to "undo and return to previous view/selection", and add a "modified undo" that would "undo but retain current view / selection". The user could then choose to use whichever is more appropriate for the specific situation.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

h-h
Posts: 110
Joined: Tue Jul 28, 2015 2:37 am
Operating System: Please select

Re: Not undoing layout changes when undoing edits

Post by h-h » Mon Aug 03, 2015 3:46 pm

steve wrote:As Gale wrote, that would be a very big change. In addition, I think that it could be highly problematic in some circumstances. The main problem that comes to mind is that the two lists could easily become desynchronised.

Perhaps an alternative approach could be for the normal Undo command (Ctrl+Z) to "undo and return to previous view/selection", and add a "modified undo" that would "undo but retain current view / selection". The user could then choose to use whichever is more appropriate for the specific situation.
Wouldn't there be the same algorithm for both approaches to make up for, say, missing tracks that should be layouted? If something is not available anymore, it just cannot be taken care of. If something has no layout data, it retains its current layout or gets a default layout.

Maybe the main problem is to have someone who knows how to exactly accomplish all cases that could happen. Is this a problem?

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Not undoing layout changes when undoing edits

Post by Gale Andrews » Mon Aug 03, 2015 7:28 pm

h-h wrote:
steve wrote:As Gale wrote, that would be a very big change. In addition, I think that it could be highly problematic in some circumstances. The main problem that comes to mind is that the two lists could easily become desynchronised.

Perhaps an alternative approach could be for the normal Undo command (Ctrl+Z) to "undo and return to previous view/selection", and add a "modified undo" that would "undo but retain current view / selection". The user could then choose to use whichever is more appropriate for the specific situation.
Wouldn't there be the same algorithm for both approaches to make up for, say, missing tracks that should be layouted? If something is not available anymore, it just cannot be taken care of. If something has no layout data, it retains its current layout or gets a default layout.

Maybe the main problem is to have someone who knows how to exactly accomplish all cases that could happen. Is this a problem?
I think it's a problem of time, and perhaps deciding the best behaviour in edge cases, rather than someone capable enough to do it. We have made some improvements already.

If we are going to have more than one undo stack, I would rather have an undo stack per track than a layout stack. I would rather minimise the cases where you would need a choice between undo retaining the view/selection or not.

On the whole I prefer to expand View > Region Restore so that it automatically captures the last one (or more) selection/cursor position-with-view/zoom positions and lets you go back there as far as possible without undoing anything.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

h-h
Posts: 110
Joined: Tue Jul 28, 2015 2:37 am
Operating System: Please select

Re: Not undoing layout changes when undoing edits

Post by h-h » Tue Aug 04, 2015 1:52 am

I especially find it annoying if the heights of tracks or the selection is changed when undoing. If you say, there's a lack of time, I think you mean that a todo for this feature would reside for a decade or more without being implemented. Then maybe steve's alternative suggestion would be the way to go.

Undo per track would be helpful, too, although it should probably be a subset of the overall undo stack that would still be necessary.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Not undoing layout changes when undoing edits

Post by Gale Andrews » Tue Aug 04, 2015 5:17 pm

h-h wrote:I especially find it annoying if the heights of tracks or the selection is changed when undoing. If you say, there's a lack of time, I think you mean that a todo for this feature would reside for a decade or more without being implemented. Then maybe steve's alternative suggestion would be the way to go.
The track height is a specific problem so should not take 10 years to address.

Presumably this happens because you decide to change the track height after an edit, then undo the edit? Are there any other steps to reproduce the problem?

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

h-h
Posts: 110
Joined: Tue Jul 28, 2015 2:37 am
Operating System: Please select

Re: Not undoing layout changes when undoing edits

Post by h-h » Tue Aug 04, 2015 5:41 pm

The problem does not exist every time you changed track height and undo an edit. However, reproduce the problem this way:
  • Record a track (stereo)
  • Record a track
  • Change the height of the upper track
  • Undo recording the second track
I have to correct myself in this point: That the selection is changed when undoing is rather wanted.

(Additional request:) Besides it's not so great that you are stuck to the change you made when you tried moving the divider line between stereo subtracks. Centering it again, e.g. with double click, would be desirable.

Locked