Commit 0f532980 authored by luyikei's avatar luyikei

DoubleWidget: setValue after setting minimum and maximun values.

This will avoid resetting the original value.
parent 456bf824
......@@ -30,8 +30,6 @@ DoubleWidget::DoubleWidget( SettingValue *s, QWidget *parent /*= nullptr*/ ) :
{
m_spinbox = new QDoubleSpinBox( this );
layout()->addWidget( m_spinbox );
changed( s->get() );
if ( ( s->flags() & SettingValue::Clamped ) != 0 )
{
if ( s->min().isValid() )
......@@ -39,6 +37,7 @@ DoubleWidget::DoubleWidget( SettingValue *s, QWidget *parent /*= nullptr*/ ) :
if ( s->max().isValid() )
m_spinbox->setMaximum( s->max().toDouble() );
}
changed( s->get() );
}
bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment