Skip to content

Commit

Permalink
Fix #49127 slider widget
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and github-actions[bot] committed Jun 22, 2022
1 parent 1b1ccf0 commit 336fc72
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/gui/qgsslider.cpp
Original file line number Diff line number Diff line change
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 336fc72

Please sign in to comment.