[vlmc-devel] DoubleWidget: setValue after setting minimum and maximun values.

Yikai Lu git at videolan.org
Mon Jul 4 15:34:09 CEST 2016


vlmc | branch: medialibrary | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Jun 20 18:53:48 2016 +0900| [0f532980d7b7db0d8190a10e2d4cff99b6447f73] | committer: Yikai Lu

DoubleWidget: setValue after setting minimum and maximun values.

This will avoid resetting the original value.

> https://code.videolan.org/videolan/vlmc/commit/0f532980d7b7db0d8190a10e2d4cff99b6447f73
---

 src/Gui/settings/DoubleWidget.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/Gui/settings/DoubleWidget.cpp b/src/Gui/settings/DoubleWidget.cpp
index c5af7ab..2f0697c 100644
--- a/src/Gui/settings/DoubleWidget.cpp
+++ b/src/Gui/settings/DoubleWidget.cpp
@@ -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



More information about the Vlmc-devel mailing list