]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
NPAL19303: EDF 677 VISU : Time Stamps are mixed during ScalaMapOnDeformedShape presen...
authorsln <sln@opencascade.com>
Wed, 23 Apr 2008 07:38:11 +0000 (07:38 +0000)
committersln <sln@opencascade.com>
Wed, 23 Apr 2008 07:38:11 +0000 (07:38 +0000)
UpdateLastVisitedPrs() method is updated. SetScalarField() method is called for scalar map on deformed shape in order to provide correct time stamp

src/VISU_I/VISU_ColoredPrs3dCache_i.cc

index 45ace2f3cccfbeea2f8d5b5b54522387f7adebc4..6b1143a2cbbc47c83acf87a47c381d1dc0c0371d 100644 (file)
@@ -651,7 +651,16 @@ VISU::ColoredPrs3dCache_i
     //if(MYDEBUG) PrintCache();
     
     aPrs3d->SameAs(thePrs);
-    aPrs3d->UpdateActors();
+    
+    // special case for deformed shape
+    VISU::ScalarMapOnDeformedShape_i* dShape =
+      dynamic_cast<VISU::ScalarMapOnDeformedShape_i*>( aPrs3d.get() );
+    if ( dShape && dShape->GetScalarTimeStampNumber() != theInput.myTimeStampNumber )
+    {
+      dShape->SetScalarField( dShape->GetScalarEntity(),
+        dShape->GetFieldName(), theInput.myTimeStampNumber );            
+    }                    
+
     if(CORBA::is_nil(theView3D))
       return false;
 
@@ -695,6 +704,8 @@ VISU::ColoredPrs3dCache_i
 
            aPrs3d->SetActiveState(true);
          }
+
+         aPrs3d->UpdateActors();
          ProcessVoidEvent(new TRenderEvent(aViewWindow));
          //aViewWindow->getRenderWindow()->Render();
          return true;