Skip to content

Fix for Bug 476512

Holly Zumbrunnen requested to merge zholly/krita:master into master

Update kis_layer_manager.cc to create a new empty layer and then merge it in order to prevent the undo history from being invalidated when animation is enabled. This is to fix this bug: https://bugs.kde.org/show_bug.cgi?id=476512

The bug causes the undo history for actions done on a layer to be invalidated when a keyframe is added to that layer and it is the first time a keyframe has been added. The undo stack still has the correct number of items in it, it just can't restore any of the invalidated ones for undos. This bug doesn't happen when you add a mask to the layer or add another layer and then merge it to the one you want to add the keyframe to (hence this "fix"). It also doesn't affect the undo history if you add the keyframe to a layer you didn't draw on. It only affects the undo history relating to that specific layer, so even if you drew on layer 1, drew two lines on layer 2, and then added a keyframe to layer 2, you would get two undos that do nothing, and then would start undoing from layer 1 as expected.

I sincerely apologize for the quality of this merge request. I am a student with this as a project and needed to submit something today to meet the deadline or I get no credit, but I could not get to the bottom of this bug in time as I had hoped. I hope at least this more detailed description of the bug is helpful.

Merge request reports