]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
0020870: EDF 1410 VISU: Anomaly in the Gauss point representation
authorvsr <vsr@opencascade.com>
Thu, 18 Nov 2010 11:05:40 +0000 (11:05 +0000)
committervsr <vsr@opencascade.com>
Thu, 18 Nov 2010 11:05:40 +0000 (11:05 +0000)
src/PIPELINE/VISU_ColoredPL.cxx
src/PIPELINE/VISU_ColoredPL.hxx
src/VISU_I/VISU_ColoredPrs3dCache_i.cc

index a14d401efd47dc69b0f82453107b6758d4363546..ec81c1fd5248cc0621b1acdbf27b347de0ca9eaa 100644 (file)
@@ -517,3 +517,12 @@ VISU_ColoredPL
   GetSourceRange( aRange );
   SetScalarRange( aRange );
 }
+
+//----------------------------------------------------------------------------
+void
+VISU_ColoredPL
+::UpdateMapperLookupTable()
+{
+  //rnv: This method update pointer to the myMapperTable in the MapperHolder
+  GetMapperHolder()->SetLookupTable(GetMapperTable());
+}
index e577196912cbcf327ba87469e2a2ff6f85d10a59..a43c157e3d1c5ae7095594e937c81e0170aa0dd0 100644 (file)
@@ -141,6 +141,11 @@ public:
   void
   SetSourceRange();
 
+  virtual
+  void
+  UpdateMapperLookupTable();
+  
+
 protected:
   //----------------------------------------------------------------------------
   VISU_ColoredPL();
index 82ae9dfd28b4193c0195e70e2f73affacd220d11..58357017eeda54e5b7db66f461fdde389cebf80c 100644 (file)
@@ -39,6 +39,7 @@
 #include "VISU_Actor.h"
 
 #include "VISU_PipeLine.hxx"
+#include "VISU_GaussPointsPL.hxx"
 
 #include "SALOME_Event.h"
 
@@ -673,6 +674,16 @@ VISU::ColoredPrs3dCache_i
     
     aPrs3d->SameAs(thePrs);
     
+    // 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.
+    VISU::GaussPoints_i* gPoints  = dynamic_cast<VISU::GaussPoints_i*>( aPrs3d.get() );
+    if(gPoints) {
+      ProcessVoidEvent(new TVoidMemFunEvent<VISU_GaussPointsPL>
+                      (gPoints->GetSpecificPL(), &VISU_GaussPointsPL::UpdateMapperLookupTable));
+    }
+    
     // special case for deformed shape
     VISU::DeformedShapeAndScalarMap_i* dShape =
       dynamic_cast<VISU::DeformedShapeAndScalarMap_i*>( aPrs3d.get() );