Undo stack becomes desynchronized when making a clipping mask using a group that contains another clipping mask
I often want to clip a group that already contains another clipping mask, and sometimes I accidentally use the wrong top object when making the mask. In this case, Undo does not return the scene to its previous state. Instead, various strange things happen.
To replicate:
- Create a group (A) that contains a clipping mask (B) and at least one other object
- Create an object (C) to be clipped
- Bring A over top of C, select both and make clipping mask
- Undo
The scene should return to its original state, but instead the inner mask (B) is modified. Sometimes this presents as objects inside the mask losing their fill & stroke, and sometimes it presents as the inner mask(s) simply being released. (Seems to depend on just how complex the group is)
It doesn't come up often, but when it does it's impossible to get the document back to its original state using undo, and can result in some lost work.
-
I see now!
Undo here behaves the same way as if the resulting clipping group gets released... but in case of releasing it makes sense, since the fill is not stored for a clipping object... but why it gets dropped for Undo?To be fair, this is not new, and older versions behave the same way — just checked it in CS6.
But it dos not mean it should not be fixed. Thanks for the find! -
Kevin Laity commented
@Egor Sure, I'm attaching a video of the bug in action and the test file created in the video. This is on an M2 mac running Sonoma.
Edit: not sure if my attachments got through, here's a google drive link containing them:
https://drive.google.com/drive/folders/1Ww-LBTac8QJlAcyX7KnhF65VYlYWJsvl?usp=sharing(Edited by admin) -
Not sure I follow the steps correctly.
Not matter if A is above or below C, Undo returns me to the way it looked before clipping just fine.Kevin, can you please record a video of it? A test file would be good to have to (to exclude misinterpreting).