浏览代码

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 年之前
父节点
当前提交
cc18d6fd25
共有 1 个文件被更改,包括 1 次插入1 次删除
  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());