Fix brush preview in tiles mode when the fg color is the mask color

The FG color shouldn't have relevance when we are in tiles mode (only
the fg tile should have it).
This commit is contained in:
David Capello 2020-08-24 15:37:08 -03:00
parent 0c351f6fcf
commit 162f6d802a

View File

@ -125,6 +125,9 @@ void BrushPreview::show(const gfx::Point& screenPos)
// Get the current tool
tools::Ink* ink = m_editor->getCurrentEditorInk();
// Get current tilemap mode
TilemapMode tilemapMode = ColorBar::instance()->tilemapMode();
const bool isFloodfill = m_editor->getCurrentEditorTool()->getPointShape(0)->isFloodFill();
const auto& dynamics = App::instance()->contextBar()->getDynamics();
@ -148,6 +151,7 @@ void BrushPreview::show(const gfx::Point& screenPos)
m_type = SELECTION_CROSSHAIR;
}
else if (
(tilemapMode == TilemapMode::Pixels) &&
(brush->type() == kImageBrushType ||
((isFloodfill ? 1: brush->size()) > (1.0 / m_editor->zoom().scale()))) &&
(// Use cursor bounds for inks that are effects (eraser, blur, etc.)