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

ImageViewer: Disable image actions when there is no image

Previously some actions like Rotate/Flip/Set as Desktop Wallpaper would
make the application crash if no image was loaded. Now image actions are
enabled/disabled based on whether an image has been loaded or not.
This commit is contained in:
DragonAlex98 2021-05-16 10:01:29 +02:00 committed by Linus Groh
parent 400d3ddb08
commit bce119036a
3 changed files with 29 additions and 2 deletions

View file

@ -42,6 +42,7 @@ public:
Function<void(int, Gfx::IntRect)> on_scale_change;
Function<void()> on_doubleclick;
Function<void(const GUI::DropEvent&)> on_drop;
Function<void(const Gfx::Bitmap*)> on_image_change;
private:
ViewWidget();