Closed dsizzle closed 1 year ago
actually I got layer data working for undo, but not redo. that is to say:
but it's better than before. also works for merging/undo merge the same way.
Nice! I gave it a little test run. Here's one thing I found:
I figured out the problem, not sure of the fix yet. A difference with this change is that when you un-delete a layer, it gets selected. Previously undoing a layer deletion kept the current selection (which I think is wrong). Seems like some percentage of the time, the layer isn't really selected until you click on it, so the UI doesn't work. Hmm....
ok. I think it's fixed by sort of forcing an update of the Layer window.
Hmm... doing the same as described above, still the transparency isn't restored after undoing the "Delete layer".
doing the same as described above, still the transparency isn't restored after undoing the "Delete layer".
but does everything else work?
Not completely. If I do this:
then undo one by one:
then re-do everything. then undo one by one again:
It's a bit complicated... best try yourself, do these steps from above:
So the transparency part is a problem. But I mentioned above that undo/redo/undo/redo doesn’t work. But undo/redo should.
Ok, I fixed the transparency for undoing a deleted layer. But still, undo/redo/undo/redo doesn't work, as before.
I had forgotten I needed to do a bit of a hack for transparency because it's a live updating slider. So I only want an Undo event when you stop sliding, but I need to update the layer transparency every time the slider moves. That means I need to keep track of what the original transparency was before the user started messing with it. I think it's good now.
Sorry, I misunderstood and thought you've fixed it completely. :) Anyway, aside from redoing a deleted layer, it works very nicely now. Merge!
Partially addresses #240
The remaining piece from the ticket is layer re-arranging. However, another area that should be improved is deleting a layer. Currently all layer settings are lost when you delete and then undo.