We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a610d9a commit ae71d2bCopy full SHA for ae71d2b
Userland/Applications/PixelPaint/MainWidget.cpp
@@ -26,6 +26,7 @@
26
#include <LibGUI/Toolbar.h>
27
#include <LibGUI/Window.h>
28
#include <LibGfx/Bitmap.h>
29
+#include <LibGfx/Rect.h>
30
31
namespace PixelPaint {
32
@@ -467,7 +468,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
467
468
// FIXME: disable this action if there is no selection
469
if (editor->selection().is_empty())
470
return;
- auto crop_rect = editor->selection().bounding_rect();
471
+ auto crop_rect = editor->image().rect().intersected(editor->selection().bounding_rect());
472
editor->image().crop(crop_rect);
473
editor->selection().clear();
474
}));
0 commit comments