diff --git a/src/app/tools/ink_processing.h b/src/app/tools/ink_processing.h index ab71fb529..8a49d4370 100644 --- a/src/app/tools/ink_processing.h +++ b/src/app/tools/ink_processing.h @@ -1152,8 +1152,8 @@ public: } // Case: during brush preview of PaintBucket Tool else if (loop->getController()->isOnePoint()) { - m_u = m_brush->bounds().w / 2; - m_v = m_brush->bounds().h / 2; + m_u = 0; + m_v = 0; } else { m_u = ((m_brush->patternOrigin().x % loop->sprite()->width()) - loop->getCelOrigin().x) % m_width; diff --git a/src/app/ui/editor/brush_preview.cpp b/src/app/ui/editor/brush_preview.cpp index b4c3ee92a..a1dd7dc51 100644 --- a/src/app/ui/editor/brush_preview.cpp +++ b/src/app/ui/editor/brush_preview.cpp @@ -166,8 +166,9 @@ void BrushPreview::show(const gfx::Point& screenPos) const bool isFloodfill = m_editor->getCurrentEditorTool()->getPointShape(0)->isFloodFill(); // TODO add support for "tile-brushes" gfx::Rect origBrushBounds = - (isFloodfill || site.tilemapMode() == TilemapMode::Tiles ? gfx::Rect(0, 0, 1, 1): - brush->bounds()); + ((isFloodfill && brush->type() != BrushType::kImageBrushType) || + site.tilemapMode() == TilemapMode::Tiles ? gfx::Rect(0, 0, 1, 1) + : brush->bounds()); gfx::Rect brushBounds = origBrushBounds; // Cursor in the screen (view) diff --git a/src/app/ui/editor/tool_loop_impl.cpp b/src/app/ui/editor/tool_loop_impl.cpp index b09fa3280..75dab265e 100644 --- a/src/app/ui/editor/tool_loop_impl.cpp +++ b/src/app/ui/editor/tool_loop_impl.cpp @@ -973,9 +973,14 @@ public: tools::WellKnownPointShapes::Brush); } else if (m_pointShape->isFloodFill()) { - m_pointShape = App::instance()->toolBox()->getPointShapeById - (m_tilesMode ? tools::WellKnownPointShapes::Tile: - tools::WellKnownPointShapes::Pixel); + const char* id; + if (m_tilesMode) + id = tools::WellKnownPointShapes::Tile; + else if (m_brush->type() == BrushType::kImageBrushType) + id = tools::WellKnownPointShapes::Brush; + else + id = tools::WellKnownPointShapes::Pixel; + m_pointShape = App::instance()->toolBox()->getPointShapeById(id); } }