From 8569cf449a04af08fdb769390d78e593ac6ad4da Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 22 Apr 2021 15:46:07 -0300 Subject: [PATCH] Fix magic wand tool used in a transparent layer when cel origin=(0,0) --- src/app/ui/editor/tool_loop_impl.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/ui/editor/tool_loop_impl.cpp b/src/app/ui/editor/tool_loop_impl.cpp index 6640cf8e9..b6e7bb813 100644 --- a/src/app/ui/editor/tool_loop_impl.cpp +++ b/src/app/ui/editor/tool_loop_impl.cpp @@ -501,10 +501,8 @@ public: m_frame, gfx::Clip(m_sprite->bounds())); } - else { - Cel* cel = m_layer->cel(m_frame); - if (cel && (cel->x() != 0 || cel->y() != 0)) - m_floodfillSrcImage = render::rasterize_with_sprite_bounds(cel); + else if (Cel* cel = m_layer->cel(m_frame)) { + m_floodfillSrcImage = render::rasterize_with_sprite_bounds(cel); } }