Skip to content
Snippets Groups Projects
Commit 0f532980 authored by luyikei's avatar luyikei
Browse files

DoubleWidget: setValue after setting minimum and maximun values.

This will avoid resetting the original value.
parent 456bf824
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment