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 improper color triangle rendering at document creation
Maxim Bulatitskiy8c062b0b81e8
diff --git a/plugins/dockers/advancedcolorselector/kis_color_selector_triangle.cpp b/plugins/dockers/advancedcolorselector/kis_color_selector_triangle.cppindex c4bc7e91a0..9ab76f1085 100644--- a/plugins/dockers/advancedcolorselector/kis_color_selector_triangle.cpp+++ b/plugins/dockers/advancedcolorselector/kis_color_selector_triangle.cpp@@ -154,6 +154,10 @@ KoColor KisColorSelectorTriangle::colorAt(float x, float y) constif(x<horizontalLineStart || x>horizontalLineEnd || y>triangleHeight)return KoColor::createTransparent(colorSpace());+ // if horizontalLineLength is 0, then saturation is improperly calculated+ if(horizontalLineLength == 0)+ return m_parent->converter()->fromHsvF(m_hue, 0.0, 0.0);+qreal relativeX = x-horizontalLineStart;qreal value = (y)/qreal(triangleHeight);