From 66306c4e89d32d25cf748bb3b38363057f72c4d1 Mon Sep 17 00:00:00 2001 From: vsr Date: Sat, 24 Sep 2011 17:32:30 +0000 Subject: [PATCH] Issue 0021285: EDF 1877 SMESH: Color of groups is only visible on one side --- src/Qtx/Qtx.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Qtx/Qtx.cxx b/src/Qtx/Qtx.cxx index 3c9f8caa5..a877c5c2a 100755 --- a/src/Qtx/Qtx.cxx +++ b/src/Qtx/Qtx.cxx @@ -1196,7 +1196,12 @@ QColor Qtx::mainColorToSecondary( const QColor& color, int delta ) if ( cs.isValid() ) { int val = qMin( 255, qMax( cs.value() + delta, 0 ) ); int sat = qMin( 255, qMax( cs.saturation() + delta-(val-cs.value()), 0 ) ); - cs.setHsv( cs.hue(), sat, val ); +#ifdef BICOLOR_CHANGE_HUE + int hue = qMin( 359, qMax( cs.hue() + delta-(val-cs.value())-(sat-cs.saturation()), 0 ) ); +#else + int hue = cs.hue(); +#endif + cs.setHsv( hue, sat, val ); } return cs; } -- 2.39.2