mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
PixelPaint: Implement Merge Active Layer Up
Implements 'Merge Active Layer Up' and adds it to the 'Layer' menu.
This commit is contained in:
parent
db299e9804
commit
7e5b3ce26b
3 changed files with 29 additions and 0 deletions
|
@ -591,6 +591,17 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
|||
editor->did_complete_action();
|
||||
}));
|
||||
|
||||
m_layer_menu->add_action(GUI::Action::create(
|
||||
"Merge &Active Layer Up", [&](auto&) {
|
||||
auto* editor = current_image_editor();
|
||||
VERIFY(editor);
|
||||
auto active_layer = editor->active_layer();
|
||||
if (!active_layer)
|
||||
return;
|
||||
editor->image().merge_active_layer_up(*active_layer);
|
||||
editor->did_complete_action();
|
||||
}));
|
||||
|
||||
m_layer_menu->add_action(GUI::Action::create(
|
||||
"M&erge Active Layer Down", { Mod_Ctrl, Key_E }, [&](auto&) {
|
||||
auto* editor = current_image_editor();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue