diff --git a/src/app/ui/editor/brush_preview.cpp b/src/app/ui/editor/brush_preview.cpp index 97853404b..857e5bba1 100644 --- a/src/app/ui/editor/brush_preview.cpp +++ b/src/app/ui/editor/brush_preview.cpp @@ -251,7 +251,7 @@ void BrushPreview::show(const gfx::Point& screenPos) { std::unique_ptr loop( create_tool_loop_preview( - m_editor, extraImage, + m_editor, brush, extraImage, extraCelBounds.origin())); if (loop) { loop->getInk()->prepareInk(loop.get()); diff --git a/src/app/ui/editor/tool_loop_impl.cpp b/src/app/ui/editor/tool_loop_impl.cpp index 6de779a70..b72ba1b7b 100644 --- a/src/app/ui/editor/tool_loop_impl.cpp +++ b/src/app/ui/editor/tool_loop_impl.cpp @@ -829,14 +829,14 @@ public: Editor* editor, tools::Tool* tool, tools::Ink* ink, + const BrushRef& brush, const app::Color& fgColor, const app::Color& bgColor, Image* image, const gfx::Point& celOrigin) : ToolLoopBase(editor, editor->getSite(), tool, ink, tool->getController(tools::ToolLoop::Left), - App::instance()->contextBar()->activeBrush(tool, ink), - tools::ToolLoop::Left, fgColor, bgColor) + brush, tools::ToolLoop::Left, fgColor, bgColor) , m_image(image) { m_celOrigin = celOrigin; @@ -885,7 +885,9 @@ public: }; tools::ToolLoop* create_tool_loop_preview( - Editor* editor, Image* image, + Editor* editor, + const doc::BrushRef& brush, + Image* image, const gfx::Point& celOrigin) { tools::Tool* tool = editor->getCurrentEditorTool(); @@ -911,7 +913,7 @@ tools::ToolLoop* create_tool_loop_preview( // Create the new tool loop try { return new PreviewToolLoopImpl( - editor, tool, ink, + editor, tool, ink, brush, fg, bg, image, celOrigin); } catch (const std::exception&) { diff --git a/src/app/ui/editor/tool_loop_impl.h b/src/app/ui/editor/tool_loop_impl.h index 2c2c351f4..0e2be99c5 100644 --- a/src/app/ui/editor/tool_loop_impl.h +++ b/src/app/ui/editor/tool_loop_impl.h @@ -47,6 +47,7 @@ namespace app { tools::ToolLoop* create_tool_loop_preview( Editor* editor, + const doc::BrushRef& brush, doc::Image* image, const gfx::Point& celOrigin);