Photoshop: Don't understand the undo/redo system

  • 28
  • Idea
  • Updated 1 year ago
  • Implemented
  • (Edited)
Unlike most modern apps, Photoshop only has a single "undo". If you press command-z a second time, Photoshop will redo the change instead of continuing to undo. Not even Illustrator or InDesign works this way at this point.

To work around this issue, I customize my keyboard shortcuts to use "step backward" (command-z) and "step forward" (command-shift-z). For the most part this works great and I've been very happy with it.

But it brings up a new problem: if I change the selected layer, then press command-z ("step backward") then the layer change is undone as well. This is a constant frustration for me, and it seems there's no solution to get both the behaviors I want.

To me, there are two possible ways to fix this problem:
• Adopt a standard undo/redo system with multiple levels of undo/redo
• Make layer selection a separate step in the history

Personally I don't care that much, I'd be happy with either. But adopting a standard undo/redo system makes more sense to me, for consistency amongst the CS apps (as well as other apps). Perhaps it could be an option if there's disagreement over what works best for people.
Photo of Michael Piontek

Michael Piontek

  • 3 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 28
Photo of Marc Edwards

Marc Edwards

  • 130 Posts
  • 22 Reply Likes
It certainly seems like multiple undos on Command-Z (Ctrl-Z) with redo on Command-Shift-Z is the norm these days, unlike 10 years ago. I'd be all for seeing this in Photoshop as well, to bring it in line with Illustrator, InDesign and most modern apps.

I don't know if there's any technical issues with including layer selection as a history state, but that seems to make sense as well.
Photo of John Nack

John Nack

  • 1 Post
  • 0 Reply Likes
You're touching on two separate issues:
1. The keyboard shortcuts used for undo/redo
2. Layer selection changing upon undo

1. Photoshop's unusual Cmd-Z mapping is due to the fact that the app lets you toggle across multiple history states in one keypress.

For example, you might do something, then click 10 steps back in the History panel. Let's say you then hit Cmd-Z. Would you expect Photoshop to undo the most recent operation (getting you back to where you'd been prior to the last click), or to go to the 11th-back history state (that is, to go further back in time)? I'd expect PS to do what it does now: it undoes the click instead of digging me deeper.

I'm not sure it's possible to preserve the current (and to my mind correct) behavior while also making Cmd-Z work in the more common way (which is also correct). Of course PS could ask customers to make a choice via a dialog, but that's just a recipe for blank stares.

2. I can't think of a good reason for the current behavior. It seems like a rough edge that didn't get polished when PS added multiple layer selection. It's worth asking the team whether it can be changed.
Photo of Michael Piontek

Michael Piontek

  • 3 Posts
  • 0 Reply Likes
Thanks for the response John. I'm not sure I agree with you on 1 but you do present a good case where the current behavior makes sense for some people.

Sounds good on issue 2 though, I'd be very happy if that was changed. If there's some disagreement, perhaps an option could be added in the "History Options" section of the History palette. There's already an option "Make Layer Visibility Changes Undoable". Adding a "Make Layer Selection Changes Undoable" option could be one way to address this.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 15986 Posts
  • 2503 Reply Likes
You can try this script as a workaround (remap the step backward keyboard shortcut to the script):

http://www.polycount.com/forum/showpo...
Photo of Michael Piontek

Michael Piontek

  • 3 Posts
  • 0 Reply Likes
Very helpful, thank you!
Photo of Sergey Kritskiy

Sergey Kritskiy

  • 54 Posts
  • 23 Reply Likes
Right now selecting a different layer doesn't show up in History.

The common issue with this looks like that:

You change current layer from A to B. You make a stroke. You hitg 'Step Backward'. Photoshop undoes stroke AND selects layer A. You continue to work on layer A thinking you're actually on layer B.

This thing bugs _lot_ of people.

Can you please consider to add an option to make layer selects undoable?

It could be the same History option like with 'layer visibility' right now: turning this on allows you to undo layer visibility changes.

Please please please

This reply was created from a merged topic originally titled
Make layer selects changes undoable!.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 16089 Posts
  • 2531 Reply Likes
Official Response
Try this script as a workaround for the behavior where step backward changes the selected layer (remap the step backward keyboard shortcut to the script):

http://www.polycount.com/forum/showpo...
Photo of brett gilmour

brett gilmour

  • 44 Posts
  • 7 Reply Likes
Often when I undo a step in Photoshop, a different layer is selected from the layer I was working on. How can I turn off this super-annoying feature?

It even happens after I've done several steps on the current layer but only undo one step. WHY would it jump to a layer from 3 steps ago?

Brett Gilmour
Brett Gilmour Photography

This reply was created from a merged topic originally titled
Photoshop: After "undo", different layer are selected.
Photo of Juho Ruuttunen

Juho Ruuttunen

  • 3 Posts
  • 1 Reply Like
I also would like to voice my opinion of hating it when Photoshop changes the active layer. I decide which layer I want to paint in, dammit!

Thanks a lot for the script, but would it really be so hard to make a "don't switch layers automatically EVER!"-tick in the preferences menu?

edit:
AWESOME!
The script works perfectly! I can't stay mad, this thing did everything I wanted. Thank you Jeffrey!
Photo of Allen W

Allen W

  • 86 Posts
  • 10 Reply Likes
Please make Photoshop's "step backward" command maintain current layer selection (like the "undo" command's behavior). So that when using the "step backward" to undo something it doesn't unnecessarily select a different layer . The current "step backward" layer change issue is inconvenient because it causes unnexpected layer selection change.

This reply was created from a merged topic originally titled
Make "step backward" command maintain current layer selection (like the "undo" command's behavior)....
Photo of Allen W

Allen W

  • 86 Posts
  • 10 Reply Likes
i really hope adobe officially fixes this in the next version!

but in the meantime, someone make a script you can use to workaround the issue...
http://www.polycount.com/forum/showth...
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
Say you have 2 layers in a Photoshop document:
[] layerA
[] layerB

And you have layerB selected:

[] layerA
[] layerB < selected

Then you select layerA:

[] layerA < selected
[] layerB

Then you paint a brush stroke on LayerA

[] layerA < selected, now with one brush stroke
[] layerB

Then you undo that brush stroke. (CTL+Z)
What you get is:

[] layerA < brush stroke removed
[] layerB < selected,

It undoes not only the brush stroke but the layer selection operation.
What I'd prefer would be to end up with:

[] layerA < selected, with brush stroke removed.
[] layerB

I can't tell you how many times I've been working on an image with multiple layers, selected a new layer, painted something that I didn't like, undone that operation, and then discovered sometime later that I've been painting on the wrong layer for a while because of this behavior.

It's not a huge deal of course, and there are plenty of workarounds, but the behavior seems a bit strange and unintuitive. Lesser programs could not be bothered with such minor issues, but Photoshop, and the near pinnacle of perfection that the program represents, might have the motivation to address this tiny blemish on it's smoothly polished interface.

It's like a chip in the paint of a car. For an ordinary car, this wouldn't matter, but Photoshop is a Lamborghini, and it needs to shine.

This reply was created from a merged topic originally titled
Photoshop: Can't understand why step backward changes layer selection.
Photo of Dermot Power

Dermot Power

  • 10 Posts
  • 0 Reply Likes
Thanks for this detailed description . I wasn't sure of the exact details- e.g. I figured it was happening when I create a new layer , make a mark, then undo. (as opposed to select a layer, make a mark, undo). I put up with it for years because I used Painter entirely for painting and photoshop for tweaking. But Painter's screen redraw is so bad compared to PSDs, as well as the brush improvements in PSD that I now paint exclusively in PSD and am much more sensitive to the problem.
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
Since there was some confusion as to whether we were all crazy, I decided to make a video : https://www.youtube.com/watch?v=oqWe8c...
Photo of Photoshop FAQ

Photoshop FAQ, Official Rep

  • 162 Posts
  • 7 Reply Likes
Dear Adobe Gripes #15685 & #12793

"Why does the "Step backward" command also switch back to the layer that
was previously selected? It forces me to make dummy strokes before
painting on a new layer so I don't accidentally switch back."

"Please stop photoshop going back to the previous layer when undo, it gets tiresome having to reselect the layer over and over again when experimenting with changes."
Photo of Antonis Makriyannis

Antonis Makriyannis

  • 10 Posts
  • 0 Reply Likes
If you are working on a layer and you select another layer and perform an action there and then you hit "Undo", Photoshop doesn't just undo the last action but "takes you" to the previously selected layer too.

So, if you have made say a brush stroke and you want to just undo it and try again, you have to take the extra time and reselect the layer.

Anyone else with the same "problem"?

This reply was created from a merged topic originally titled
Photoshop: Poor undo functionality?.
Photo of Allen W

Allen W

  • 86 Posts
  • 10 Reply Likes
will this make it into CS6?
Photo of Gene Poole

Gene Poole

  • 4 Posts
  • 1 Reply Like
Hi Jeffery,

Any instructions on how to install and use the script you provided?

Thanks.
Photo of Allen W

Allen W

  • 86 Posts
  • 10 Reply Likes
did this make it into CS6?
Photo of Sergey Kritskiy

Sergey Kritskiy

  • 54 Posts
  • 23 Reply Likes
Allen, it didn't.

Gene, copy the .jsx to scripts folder of PS (for Mac: /Applications/Adobe Photoshop CS6/Presets/Scripts, I guess for win it's almost the same), restart PS, navigate to Edit > Keyboard shortcuts and Menus, find the script under File > Scripts > StepBackwardSmart and assign the key of your choice.
Photo of Gene Poole

Gene Poole

  • 4 Posts
  • 1 Reply Like
Hi Sergey,

Thanks for the reply. I copied the code provided in the link to Windows notepad and saved it as a text file. Then I renamed it to a .jsx extension. Is this the correct way to do it?

When you say "assign the key of your choice", are you referring to the keyboard (like a shortcut key)? If so, does that mean every time I want to run the script (i.e. stop undo from reverting to the previous layer) I have to remember to push the key?

Thanks again
Photo of Sergey Kritskiy

Sergey Kritskiy

  • 54 Posts
  • 23 Reply Likes
Hey Gene,

Well I guess the fastest way would be just right-click on the .jsx file on polycount's web page and hit 'Save As..' and save it to your PS's Scripts folder, but saving through Notepad'd work too.

The script doesn't just stop undo from jumping on layers, it basically replaces 'Step Backward' functionality: it does the same plus remembers the layer you've been on. So the logical choice for a shortcut key would be the same key you've previously had for PS's 'Step Backward' command: for me that was cmd+Z

Sergey.
Photo of Gene Poole

Gene Poole

  • 4 Posts
  • 1 Reply Like
Hi Sergey,

That would have been easier :)

I don't think this script is going to work for me because I don't use the shortcut key to undo. I use the history tab because I usually go back several steps and it's easier for me to just select the history level I want to revert to.

This issue is a bad decision by Adobe. It wasn't a problem with PS2 (I upgraded to PS5). It's is an irritating "feature" that should be changed or at least given the option of disabling. I see from all the threads, here and elsewhere, that I'm not alone. It seems like Adobe is starting to behave like Microsoft. They take something that was working fine and make it worse and then refuse to fix it, no matter how many people complain.
Photo of Dan Smith

Dan Smith

  • 225 Posts
  • 19 Reply Likes
Nothing changed between cs2 and cs5.
Photo of Dermot Power

Dermot Power

  • 10 Posts
  • 0 Reply Likes
CS6 and we are still complaining about this topic. I got in to an extended thread on this a few years back which ended up with us all being patronised by an Adobe employee about the difference between undo and history states. I constantly face the problem outlined by numerous posters above. The latest infuriating example 10 mins ago had me trawling for solutions in the hope that CS6 might bring one. I am very grateful for the scripts posted but am a bit nervous about implementing them and think it's a bit nuts that Photoshop don't sort this problem themselves. Maybe if we emphasise that 'undoing' is not the same as 'mistake correction' it might be a more effective argument. I typically throw down a mark then instantly change my mind, undo, and throw down another one.. I might keep doing that until it looks right. I have no idea how often as I don't pay attention to it any more than I paid attention to how often I dipped my brush in water when painting with real materials back in the day. It's part of my process. But if I happen to have made a new layer and then made a mark (which is as common an event as dipping a brush in paint) and then hit the 'undo' then ....well you all know the rest. Just spent ten mins painting on the background layer without realising it. Not a big deal- I try to work with as little layers as possible anyway- but irritating. And a swarm of little irritations ends up being a massive annoyance. And don't get me started on brush folders... I waste so much time trying to find custom brushes - but hey, we've got darker IU in CS6; it was worth the wait!
Photo of Dermot Power

Dermot Power

  • 10 Posts
  • 0 Reply Likes
I followed Sergey Kritskiy's advice on using the script linked to by Jeffery above and that seems to have solved it for me. So thanks to both! As for Kris's comment below; maybe it didn't happen in CS4- it's a long time since I used that version. Early versions of software often have features that are better than later ones. (painter 6 for example)
Photo of Kris Hunt

Kris Hunt

  • 114 Posts
  • 28 Reply Likes
That's funny... I don't know what you all are talking about, since switching layers, painting a mark and hitting undo (or step backward) does not switch layers for me. I'm using CS4.
Photo of Dan Smith

Dan Smith

  • 225 Posts
  • 19 Reply Likes
That's because they don't understand how photoshop works.
Photo of Kris Hunt

Kris Hunt

  • 114 Posts
  • 28 Reply Likes
Could be... I just tried it in CS6, and it doesn't do it there, either.
Photo of Dermot Power

Dermot Power

  • 10 Posts
  • 0 Reply Likes
Check Rory Lutter's detailed description above - a detail that I didn't notice is that it's the 'selection' of a layer + stroke followed by undo that brings you back two steps. Not the 'creation' of a layer + stroke. Either way it is a common occurrence that I've just solved with Jeffery's script. But recreated using the menu's undo command instead of the keyboard shortcut (which I have assigned to the script).
Photo of Dermot Power

Dermot Power

  • 10 Posts
  • 0 Reply Likes
I can send you a screen recording of what happens if you send me a direct email address. I don't think you can post mov files to the forums?
Photo of Kris Hunt

Kris Hunt

  • 114 Posts
  • 28 Reply Likes
That's what I said. Switch layers (not create a layer), paint a mark, hit undo or go back in history... it does not switch me to the previous layer. No plug-ins installed to make it behave that way.

Video: https://www.youtube.com/watch?v=-2TBAW...
Photo of Dermot Power

Dermot Power

  • 10 Posts
  • 0 Reply Likes
step backward not undo
Photo of Dermot Power

Dermot Power

  • 10 Posts
  • 0 Reply Likes
bit low res but hopefully makes the point http://dmoxia.blogspot.co.uk/
Photo of Kris Hunt

Kris Hunt

  • 114 Posts
  • 28 Reply Likes
> step backward not undo

Gosh, I could have sworn I said twice now...

Fine. New video: https://www.youtube.com/watch?v=aBMMwu...
Photo of Dermot Power

Dermot Power

  • 10 Posts
  • 0 Reply Likes
You don't have the problem- good for you!
Photo of Sergey Kritskiy

Sergey Kritskiy

  • 54 Posts
  • 23 Reply Likes
Hi Kris. This is interesting. I don't have CS4 but you're saying that CS6 works the same as CS4 for you. This is the first time I see PS works as everyone in this thread want to. I wonder how is it possible?
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
Actually, you don't seem to understand the problem Kris.

Video: https://www.youtube.com/watch?v=oqWe8c...
Photo of Gene Poole

Gene Poole

  • 4 Posts
  • 1 Reply Like
That's exactly the problem Rory, thanks for sharing. Perhaps you or someone can forward that video to Adobe programmers for a possible fix. If they can't (or won't) fix it, I would love to hear their reasoning behind such an idiotic and frustrating action.
Photo of Allen W

Allen W

  • 86 Posts
  • 10 Reply Likes
yes that's the problem. adobe needs to see this video of the problem.
Photo of Dermot Power

Dermot Power

  • 7 Posts
  • 2 Reply Likes
Gosh Kris you must be delighted Adobe have given the rest of us the special powers you have in your photoshop!!!!! Where is your sarcastic post about it?
Photo of Allen W

Allen W

  • 86 Posts
  • 10 Reply Likes
still a problem in cs6
Photo of Dermot Power

Dermot Power

  • 10 Posts
  • 0 Reply Likes
Kris Hunt thinks we are all imagining it
Photo of Shaddy Safadi

Shaddy Safadi

  • 3 Posts
  • 0 Reply Likes
It his hugely annoying for me that step undo also undoes your layer selection. If there was a way to turn that off I would LOVE it. I waste tons of time every day fixing mistakes caused by being on the wrong layer because I selected it made some marks, quickly undid the marks, started making more marks and then later realizing I'm on the old layer! PLEASE FIX! it's been a major issue for 10 years!:)

This reply was created from a merged topic originally titled
Step Undo Annoyingly Undoes Layer Selection Too!.
Photo of Jason Thomas

Jason Thomas

  • 2 Posts
  • 2 Reply Likes
I am REALLY sick of after chosing a layer, making a brushstroke that isn't quite right, clicking "Step Backward" (alt-ctrl-z) AND PHOTOSHOP AUTOMATICALLY SELECTS THE LAST LAYER I WAS ON. This has cost me countless hours of drawing directly on the background layer. I have my Wacom pen set to "Step Backward" because I want to have more than one level of undo, but because it selects the previous layer, unless I am being really careful, I end up drawing on the wrong layer. Usually, I have had to learn to select a layer, choose the eraser tool, then pretend to erase something, just so that if I have to step backward it won't select my previous layer. If this has been addressed, great, but I keep thinking it will be, and cannot believe that by CS5 it's still happening.

This reply was created from a merged topic originally titled
Photoshop: Please stop selecting the previous layer when I do a "Step Backwards".