mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
PixelPaint: Add method to merge visible layers
This adds a function that merges all visible layers to one, ignoring the invisible.
This commit is contained in:
parent
0900e31fe0
commit
791a018c99
3 changed files with 39 additions and 0 deletions
|
@ -419,6 +419,16 @@ int main(int argc, char** argv)
|
|||
},
|
||||
window));
|
||||
|
||||
layer_menu.add_action(GUI::Action::create(
|
||||
"&Merge Visible", { Mod_Ctrl, Key_M }, [&](auto&) {
|
||||
auto* editor = current_image_editor();
|
||||
if (!editor)
|
||||
return;
|
||||
editor->image().merge_visible_layers();
|
||||
editor->did_complete_action();
|
||||
},
|
||||
window));
|
||||
|
||||
auto& filter_menu = menubar->add_menu("&Filter");
|
||||
auto& spatial_filters_menu = filter_menu.add_submenu("&Spatial");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue