Salome HOME
projects
/
modules
/
geom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
627494a
)
#18319 [CEA 18318] Display of a field with negative value
V9_4_BR
V9_4_0
V9_4_0rc2
V9_4_0rc3
author
vsr
<vsr@opencascade.com>
Mon, 18 Nov 2019 11:12:24 +0000
(14:12 +0300)
committer
vsr
<vsr@opencascade.com>
Mon, 18 Nov 2019 11:12:24 +0000
(14:12 +0300)
src/GEOMGUI/GEOM_Displayer.cxx
patch
|
blob
|
history
diff --git
a/src/GEOMGUI/GEOM_Displayer.cxx
b/src/GEOMGUI/GEOM_Displayer.cxx
index 050f2d968b91d88b15ce8d6a128e3475e4e76e64..545a2639f50141c0f4f3d183d01f3bd4064abee8 100644
(file)
--- a/
src/GEOMGUI/GEOM_Displayer.cxx
+++ b/
src/GEOMGUI/GEOM_Displayer.cxx
@@
-2900,7
+2900,10
@@
QList<QVariant> GEOM_Displayer::groupFieldData( const QList<QVariant>& theFieldS
aValue = double( aVariant.toLongLong() );
else if( aVariant.type() == QVariant::Double )
aValue = aVariant.toDouble();
- aNorm += aValue * aValue;
+ if ( theFieldNbComponents > 1 )
+ aNorm += aValue * aValue;
+ else
+ aNorm += aValue;
}
}
}
@@
-2911,7
+2914,7
@@
QList<QVariant> GEOM_Displayer::groupFieldData( const QList<QVariant>& theFieldS
{
if( anIsBoolean )
aNorm /= theFieldNbComponents;
- else
+ else
if ( theFieldNbComponents > 1 )
aNorm = pow( aNorm, 0.5 );
if( aGroupedList.isEmpty() )