1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

PixelPaint: Make the ImageEditor known throughout the Filter Gallery

This commit is contained in:
Tobias Christiansen 2022-01-01 00:42:28 +01:00 committed by Andreas Kling
parent f47026b1d6
commit ddaf496aa0
5 changed files with 16 additions and 8 deletions

View file

@ -590,7 +590,10 @@ void MainWidget::initialize_menubar(GUI::Window& window)
auto& filter_menu = window.add_menu("&Filter");
filter_menu.add_action(GUI::Action::create("Filter &Gallery", [&](auto&) {
auto dialog = PixelPaint::FilterGallery::construct(&window);
auto* editor = current_image_editor();
if (!editor)
return;
auto dialog = PixelPaint::FilterGallery::construct(&window, editor);
if (dialog->exec() != GUI::Dialog::ExecOK)
return;
}));