Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix warning with color smudge brushtip < 3px

Freya Lupen4a295811fb1c
diff --git a/libs/brush/kis_brush.cpp b/libs/brush/kis_brush.cpp
index 07b61fe4ec..eceb412705 100644
--- a/libs/brush/kis_brush.cpp
+++ b/libs/brush/kis_brush.cpp
@@ -329,6 +329,8 @@ bool KisBrush::isPiercedApprox() const
qreal w = image.width();
qreal h = image.height();
+ if (w < 3 && h < 3) { return false; }
+
qreal xPortion = qMin(0.1, 5.0 / w);
qreal yPortion = qMin(0.1, 5.0 / h);