From 5e5dd7a61c3f6777ad7f38b8a2d5cb848a47f0d1 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Wed, 13 Dec 2023 18:14:47 +0100 Subject: [PATCH] doing a fuzzy compare to avoid line duplication --- src/nodes/QskBoxGradientStroker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nodes/QskBoxGradientStroker.cpp b/src/nodes/QskBoxGradientStroker.cpp index 2c90859c..3be3c983 100644 --- a/src/nodes/QskBoxGradientStroker.cpp +++ b/src/nodes/QskBoxGradientStroker.cpp @@ -106,7 +106,8 @@ namespace { while ( !m_gradientIterator.isDone() ) { - if ( m_t0 + m_gradientIterator.position() * m_dt > pos ) + const auto pos2 = m_t0 + m_gradientIterator.position() * m_dt; + if ( pos2 > pos && !qFuzzyIsNull( pos2 - pos ) ) return; m_gradientIterator.advance();