Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #49127 slider widget
  • Loading branch information
elpaso authored and nyalldawson committed Jul 18, 2022
1 parent 130bfa4 commit 439602b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/gui/qgsslider.cpp
Expand Up @@ -86,11 +86,7 @@ void QgsSlider::update()
QSlider::setSingleStep( mStep.toInt() );
QSlider::setValue( mValue.toInt() );
}

if ( mMin.type() == QVariant::Double &&
mMax.type() == QVariant::Double &&
mStep.type() == QVariant::Double &&
mValue.type() == QVariant::Double )
else
{
if ( minimum() != 0 )
QSlider::setMinimum( 0 );
Expand Down Expand Up @@ -126,10 +122,7 @@ void QgsSlider::onValueChanged( int value )
{
mValue = value;
}
else if ( mMin.type() == QVariant::Double &&
mMax.type() == QVariant::Double &&
mStep.type() == QVariant::Double &&
mValue.type() == QVariant::Double )
else
{
mValue = QVariant( mMin.toDouble() + value * mStep.toDouble() );
}
Expand Down

0 comments on commit 439602b

Please sign in to comment.