Browse Source

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.
Tim Ledbetter 2 years ago
parent
commit
cc18d6fd25
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Applications/PixelPaint/Tools/BucketTool.cpp

+ 1 - 1
Userland/Applications/PixelPaint/Tools/BucketTool.cpp

@@ -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());