]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
0020870: EDF 1410 VISU: Anomaly in the Gauss point representation V5_1_5_BR V5_1_5 V5_1_5_patch02 V5_1_5rc3 mergeto_V5_1_main_23Nov10 mergeto_V5_1_main_26Nov10 start_V5_1_6_BR
authorvsr <vsr@opencascade.com>
Tue, 23 Nov 2010 09:31:28 +0000 (09:31 +0000)
committervsr <vsr@opencascade.com>
Tue, 23 Nov 2010 09:31:28 +0000 (09:31 +0000)
Additional fix for animation

src/VISUGUI/VisuGUI_TimeAnimation.cxx
src/VISU_I/VISU_ColoredPrs3dCache_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh

index 30c672db292c9107a1ec2a7f4c535eae76522a74..bfbcfc7ae00eebc1d4e3012cc3b639736c0c5147 100644 (file)
@@ -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());
           }
         }
index 58357017eeda54e5b7db66f461fdde389cebf80c..532e18dd27314fcc9e14a8f73d2e87f0697b1723 100644 (file)
@@ -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<VISU::GaussPoints_i*>( aPrs3d.get() );
     if(gPoints) {
-      ProcessVoidEvent(new TVoidMemFunEvent<VISU_GaussPointsPL>
-                      (gPoints->GetSpecificPL(), &VISU_GaussPointsPL::UpdateMapperLookupTable));
+      gPoints->UpdateMapperLookupTable();
     }
     
     // special case for deformed shape
index cbf800a33dc7cda558ba61677ba4a273c8f50107..3b32d82ea9282acd2ade293504bb1012a511af0e 100644 (file)
@@ -2158,3 +2158,12 @@ VISU::ColoredPrs3d_i
 
 //----------------------------------------------------------------------------
 
+void
+VISU::ColoredPrs3d_i
+::UpdateMapperLookupTable()
+{
+  ProcessVoidEvent(new TVoidMemFunEvent<VISU_ColoredPL>
+    (GetSpecificPL(), &VISU_ColoredPL::UpdateMapperLookupTable));
+}
+
+//----------------------------------------------------------------------------^
index ae796d2fc755ca5c6ef97f64313321383aca3428..dbae3b8b915f7652c3aae474ad67a1a143b25b0b 100644 (file)
@@ -628,6 +628,11 @@ namespace VISU
     SetValLblFontColor( const vtkFloatingPointType theR, 
                        const vtkFloatingPointType theG, 
                        const vtkFloatingPointType theB );
+
+    virtual
+    void
+    UpdateMapperLookupTable();
+
     
     //----------------------------------------------------------------------------
   protected: