diff --git a/Userland/Applications/PixelPaint/Image.cpp b/Userland/Applications/PixelPaint/Image.cpp index f975daa0b0..b948383484 100644 --- a/Userland/Applications/PixelPaint/Image.cpp +++ b/Userland/Applications/PixelPaint/Image.cpp @@ -237,6 +237,7 @@ ErrorOr Image::restore_snapshot(Image const& snapshot) select_layer(layer.ptr()); layer_selected = true; } + layer->did_modify_bitmap({}, Layer::NotifyClients::No); add_layer(*layer); } diff --git a/Userland/Applications/PixelPaint/Layer.cpp b/Userland/Applications/PixelPaint/Layer.cpp index 5682580ee1..16922d2984 100644 --- a/Userland/Applications/PixelPaint/Layer.cpp +++ b/Userland/Applications/PixelPaint/Layer.cpp @@ -41,6 +41,10 @@ ErrorOr> Layer::create_snapshot(Image& image, Layer const& { auto bitmap = TRY(layer.content_bitmap().clone()); auto snapshot = TRY(create_with_bitmap(image, move(bitmap), layer.name())); + if (layer.is_masked()) { + snapshot->m_mask_bitmap = TRY(layer.mask_bitmap()->clone()); + snapshot->m_edit_mode = layer.m_edit_mode; + } /* We set these properties directly because calling the setters might