From ae5b3989734b96081781e60a1846adb7ffcb4252 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Tue, 8 Oct 2024 15:11:44 +0200 Subject: [PATCH] gradients: Don't crash gammaray gammaray etc. reads the properties and when displaying the value calls the corresponding READ methods. This will lead to crashes when calling "wrong" methods for gradients. --- src/common/QskGradient.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/common/QskGradient.cpp b/src/common/QskGradient.cpp index 7d552076..6b32f8ca 100644 --- a/src/common/QskGradient.cpp +++ b/src/common/QskGradient.cpp @@ -615,8 +615,6 @@ void QskGradient::setLinearDirection( const QskLinearDirection& direction ) QskLinearDirection QskGradient::linearDirection() const { - Q_ASSERT( m_type == Linear ); - if ( m_type != Linear ) return QskLinearDirection( 0.0, 0.0, 0.0, 0.0 ); @@ -644,8 +642,6 @@ void QskGradient::setRadialDirection( const QskRadialDirection& direction ) QskRadialDirection QskGradient::radialDirection() const { - Q_ASSERT( m_type == Radial ); - if ( m_type != Radial ) return QskRadialDirection( 0.5, 0.5, 0.0 ); @@ -683,8 +679,6 @@ void QskGradient::setConicDirection( const QskConicDirection& direction ) QskConicDirection QskGradient::conicDirection() const { - Q_ASSERT( m_type == Conic ); - if ( m_type != Conic ) return QskConicDirection( 0.5, 0.5, 0.0, 0.0 );