--- a/src/linetypes/circularprimitive.cpp Tue Jun 19 21:57:39 2018 +0300 +++ b/src/linetypes/circularprimitive.cpp Tue Jun 19 22:00:46 2018 +0300 @@ -242,10 +242,7 @@ return 0; case PrimitiveModel::Chord: - if (m_segments >= m_divisions -1) - return m_divisions - 2; - else - return max(0, m_segments - 1); + return qBound(0, m_segments - 1, m_divisions - 2); } return 0;