lower/upper adjustements changed
This commit is contained in:
parent
0e2172db30
commit
79ac52110d
@ -48,10 +48,12 @@ qreal QskBoundedRangeInput::upperValueAsRatio() const
|
|||||||
void QskBoundedRangeInput::setLowerValue( qreal value )
|
void QskBoundedRangeInput::setLowerValue( qreal value )
|
||||||
{
|
{
|
||||||
if ( isComponentComplete() )
|
if ( isComponentComplete() )
|
||||||
|
{
|
||||||
|
value = std::min( value, m_range.upperBound() );
|
||||||
value = qBound( minimum(), value, maximum() );
|
value = qBound( minimum(), value, maximum() );
|
||||||
|
}
|
||||||
|
|
||||||
const auto upperValue = std::max( m_range.upperBound(), value );
|
setRange( QskIntervalF( value, m_range.upperBound() ) );
|
||||||
setRange( QskIntervalF( value, upperValue ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal QskBoundedRangeInput::lowerValue() const
|
qreal QskBoundedRangeInput::lowerValue() const
|
||||||
@ -62,10 +64,12 @@ qreal QskBoundedRangeInput::lowerValue() const
|
|||||||
void QskBoundedRangeInput::setUpperValue( qreal value )
|
void QskBoundedRangeInput::setUpperValue( qreal value )
|
||||||
{
|
{
|
||||||
if ( isComponentComplete() )
|
if ( isComponentComplete() )
|
||||||
|
{
|
||||||
|
value = std::max( m_range.lowerBound(), value );
|
||||||
value = qBound( minimum(), value, maximum() );
|
value = qBound( minimum(), value, maximum() );
|
||||||
|
}
|
||||||
|
|
||||||
const auto lowerValue = std::min( m_range.lowerBound(), value );
|
setRange( QskIntervalF( m_range.lowerBound(), value ) );
|
||||||
setRange( QskIntervalF( lowerValue, value ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal QskBoundedRangeInput::upperValue() const
|
qreal QskBoundedRangeInput::upperValue() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user