From 1d71a540ba9ccbd506a2d2f90c7ba0fa2432eb5d Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 16 Sep 2013 13:58:57 +0200 Subject: [PATCH] Apparently QColor::set[color]f takes colors as floats clamped to the [0,1] range. --HG-- branch : gsoc2013-dfighter --- .../src/plugins/material_editor/prop_browser_ctrl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/prop_browser_ctrl.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/prop_browser_ctrl.cpp index bcaa88a67..fbb61e255 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/prop_browser_ctrl.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/prop_browser_ctrl.cpp @@ -127,10 +127,10 @@ namespace MaterialEditor } QColor color; - color.setRedF( c[ 0 ] ); - color.setGreenF( c[ 1 ] ); - color.setBlueF( c[ 2 ] ); - color.setAlphaF( c[ 3 ] ); + color.setRedF( c[ 0 ] / 255.0f ); + color.setGreenF( c[ 1 ] / 255.0f ); + color.setBlueF( c[ 2 ] / 255.0f ); + color.setAlphaF( c[ 3 ] / 255.0f ); v = color;