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
commit 1c52ca9693
Notes: sideshowbarker 2024-07-17 08:04:46 +09:00

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();
}
}));