From: vsr Date: Tue, 23 Nov 2010 09:31:28 +0000 (+0000) Subject: 0020870: EDF 1410 VISU: Anomaly in the Gauss point representation X-Git-Tag: V5_1_5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV5_1_5_BR;p=modules%2Fvisu.git 0020870: EDF 1410 VISU: Anomaly in the Gauss point representation Additional fix for animation --- diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.cxx b/src/VISUGUI/VisuGUI_TimeAnimation.cxx index 30c672db..bfbcfc7a 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.cxx +++ b/src/VISUGUI/VisuGUI_TimeAnimation.cxx @@ -1150,6 +1150,13 @@ namespace for (long aFrameId = 1; aFrameId < theData.myNbFrames; aFrameId++){ VISU::ColoredPrs3d_i* aColoredPrs3d = theData.myPrs[aFrameId]; aColoredPrs3d->SameAs(aPrs3d); + // rnv: fix for the 20870: EDF 1410 VISU: Anomaly in the Gauss point representation. + // special case for the "Gauss Points" presentation, + // update the LookupTable in the mapper, after assign properties of the presentation + // using SameAs(...) method. + if(theData.myPrsType == VISU::TGAUSSPOINTS) { + aColoredPrs3d->UpdateMapperLookupTable(); + } } if ( theAnimator->getAnimationMode() == VISU::Animation::SUCCESSIVE ) { @@ -1158,7 +1165,15 @@ namespace for (long aFrameId = 0; aFrameId < aFieldData.myNbFrames; aFrameId++) { VISU::ColoredPrs3d_i* aColoredPrs3d = aFieldData.myPrs[aFrameId]; std::string aTitle = aColoredPrs3d->GetCTitle(); - aColoredPrs3d->SameAs(aPrs3d); + aColoredPrs3d->SameAs(aPrs3d); + // rnv: fix for the 20870: EDF 1410 VISU: Anomaly in the Gauss point representation. + // special case for the "Gauss Points" presentation, + // update the LookupTable in the mapper, after assign properties of the presentation + // using SameAs(...) method. + if(theData.myPrsType == VISU::TGAUSSPOINTS) { + aColoredPrs3d->UpdateMapperLookupTable(); + } + aColoredPrs3d->SetTitle(aTitle.c_str()); } } diff --git a/src/VISU_I/VISU_ColoredPrs3dCache_i.cc b/src/VISU_I/VISU_ColoredPrs3dCache_i.cc index 58357017..532e18dd 100644 --- a/src/VISU_I/VISU_ColoredPrs3dCache_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3dCache_i.cc @@ -39,7 +39,6 @@ #include "VISU_Actor.h" #include "VISU_PipeLine.hxx" -#include "VISU_GaussPointsPL.hxx" #include "SALOME_Event.h" @@ -680,8 +679,7 @@ VISU::ColoredPrs3dCache_i // using SameAs(...) method. VISU::GaussPoints_i* gPoints = dynamic_cast( aPrs3d.get() ); if(gPoints) { - ProcessVoidEvent(new TVoidMemFunEvent - (gPoints->GetSpecificPL(), &VISU_GaussPointsPL::UpdateMapperLookupTable)); + gPoints->UpdateMapperLookupTable(); } // special case for deformed shape diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index cbf800a3..3b32d82e 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -2158,3 +2158,12 @@ VISU::ColoredPrs3d_i //---------------------------------------------------------------------------- +void +VISU::ColoredPrs3d_i +::UpdateMapperLookupTable() +{ + ProcessVoidEvent(new TVoidMemFunEvent + (GetSpecificPL(), &VISU_ColoredPL::UpdateMapperLookupTable)); +} + +//----------------------------------------------------------------------------^ diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.hh b/src/VISU_I/VISU_ColoredPrs3d_i.hh index ae796d2f..dbae3b8b 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.hh +++ b/src/VISU_I/VISU_ColoredPrs3d_i.hh @@ -628,6 +628,11 @@ namespace VISU SetValLblFontColor( const vtkFloatingPointType theR, const vtkFloatingPointType theG, const vtkFloatingPointType theB ); + + virtual + void + UpdateMapperLookupTable(); + //---------------------------------------------------------------------------- protected: