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

PixelPaint: Push layer creation onto the undo stack

Before this change, creating a layer, painting something on it and
undoing would delete the layer as well as the paint on it.
This commit is contained in:
Roberto Bampi 2022-08-21 22:41:06 +02:00 committed by Andreas Kling
parent 8fa34b43ce
commit 1c52ca9693

View file

@ -567,6 +567,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
}
editor->image().add_layer(layer_or_error.release_value());
editor->layers_did_change();
editor->did_complete_action("New Layer"sv);
m_layer_list_widget->select_top_layer();
}
}));