using fuzzy compares for bounded values
This commit is contained in:
parent
b304b25d12
commit
e663b5ca6a
|
@ -132,6 +132,12 @@ void QskBoundedControl::componentComplete()
|
|||
|
||||
qreal QskBoundedControl::boundedValue( qreal value ) const
|
||||
{
|
||||
if ( qskFuzzyCompare( value, minimum() ) )
|
||||
return minimum();
|
||||
|
||||
if ( qskFuzzyCompare( value, maximum() ) )
|
||||
return maximum();
|
||||
|
||||
return qBound( minimum(), value, maximum() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue