1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +00:00

PixelPaint: Save layer mask when adding to the UndoStack

This makes undoing actions performed on layer masks work as
expected.

did_modify_bitmap() is now also called on redo, to ensure the layer
mask is displayed correctly.
This commit is contained in:
Tim Ledbetter 2023-02-14 23:35:10 +00:00 committed by Andreas Kling
parent 34567bc145
commit f1a792e6c9
2 changed files with 5 additions and 0 deletions

View file

@ -237,6 +237,7 @@ ErrorOr<void> Image::restore_snapshot(Image const& snapshot)
select_layer(layer.ptr());
layer_selected = true;
}
layer->did_modify_bitmap({}, Layer::NotifyClients::No);
add_layer(*layer);
}