[vlmc-devel] commit: EffectSettingValue: Fixing get for Color settings. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Sat Sep 4 19:05:43 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sat Sep  4 16:51:48 2010 +0200| [f5adb7b4ad12606a4182c16a215dd144b0f1317b] | committer: Hugo Beauzée-Luyssen 

EffectSettingValue: Fixing get for Color settings.

QColor constructor takes color composant in the [0;255] range.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=f5adb7b4ad12606a4182c16a215dd144b0f1317b
---

 src/EffectsEngine/EffectSettingValue.cpp |    2 +-
 src/Gui/settings/ColorWidget.cpp         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/EffectsEngine/EffectSettingValue.cpp b/src/EffectsEngine/EffectSettingValue.cpp
index d8fe9ab..265d795 100644
--- a/src/EffectsEngine/EffectSettingValue.cpp
+++ b/src/EffectsEngine/EffectSettingValue.cpp
@@ -139,7 +139,7 @@ EffectSettingValue::get()
             f0r_param_color_t   tmp;
             m_effectInstance->effect()->m_f0r_get_param_value( m_effectInstance->m_instance,
                                                                &tmp, m_index );
-            m_val = QColor( tmp.r, tmp.g, tmp.b );
+            m_val.setValue( QColor::fromRgbF( tmp.r, tmp.g, tmp.b ) );
             break ;
         }
     case Position:
diff --git a/src/Gui/settings/ColorWidget.cpp b/src/Gui/settings/ColorWidget.cpp
index 02b51cd..86735c7 100644
--- a/src/Gui/settings/ColorWidget.cpp
+++ b/src/Gui/settings/ColorWidget.cpp
@@ -34,7 +34,7 @@ ColorWidget::ColorWidget( SettingValue *s, QWidget *parent ) :
     m_button = new QPushButton( parent );
     m_button->setPalette( QPalette(  m_color ) );
     connect( m_button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) );
-    changed( s->get() );
+    changed( m_color );
 }
 
 QWidget*



More information about the Vlmc-devel mailing list