1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00:00

PixelPaint: Use image coordinates for bucket tool bounds checking

Previously, layer coordinates were being used to check whether the
bucket tool was within the bounds of the current selection, rather
than image coordinates.
This commit is contained in:
Tim Ledbetter 2023-02-07 18:19:58 +00:00 committed by Andreas Kling
parent e8d5e938de
commit cc18d6fd25

View file

@ -50,7 +50,7 @@ void BucketTool::on_mousedown(Layer* layer, MouseEvent& event)
if (!layer->rect().contains(layer_event.position()))
return;
if (auto selection = layer->image().selection(); !selection.is_empty() && !selection.is_selected(layer_event.position()))
if (auto selection = layer->image().selection(); !selection.is_empty() && !selection.is_selected(event.image_event().position()))
return;
GUI::Painter painter(layer->get_scratch_edited_bitmap());