]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Now, it is up to actor decide whether it is needed update from ActorFactory or not...
authorapo <apo@opencascade.com>
Tue, 31 Oct 2006 06:48:19 +0000 (06:48 +0000)
committerapo <apo@opencascade.com>
Tue, 31 Oct 2006 06:48:19 +0000 (06:48 +0000)
src/OBJECT/VISU_Actor.cxx
src/OBJECT/VISU_ActorFactory.h
src/VISU_I/VISU_Prs3d_i.cc
src/VISU_I/VISU_View_i.cc

index e2e9be3293767f9e8d1fee0fb75ed26787a4b91e..bdd67e3807749b4a6b08f8d54582c231b82865a2 100644 (file)
@@ -195,8 +195,10 @@ void
 VISU_Actor
 ::UpdateFromFactory()
 {
-  myActorFactory->UpdateActor(this);
-  Update();
+  if(GetMTime() < myActorFactory->GetMTime()){
+    myActorFactory->UpdateActor(this);
+    Update();
+  }
 }
 
 void
index 13bc2729a85bd9d44cf7a618363ca143b9d85c11..7240237040f2370b47b3e16bd9e88067624962d2 100644 (file)
@@ -53,6 +53,11 @@ namespace VISU
     ~TActorFactory()
     {}
 
+    //! Return modified time of the factory
+    virtual
+    unsigned long int 
+    GetMTime() = 0;
+
     //! To update the actor
     virtual 
     void
index cc4cc6b05f18d32f57f0ab5e5e95c1566508a393..dfa1c78f9701250892c9da780dee22462bfdea70 100644 (file)
@@ -409,13 +409,9 @@ void
 VISU::Prs3d_i
 ::UpdateActor(VISU_Actor* theActor) 
 {
-  if(theActor->GetMTime() < myUpdateTime.GetMTime())
-    return;
-
   if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActor - this = "<<this<<"; theActor = "<<theActor);
-
-  theActor->ShallowCopyPL(GetPipeLine());
   theActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]);
+  theActor->ShallowCopyPL(GetPipeLine());
   theActor->Modified();
 }
 
index df7bbd6f7004c2fd9dadede471e111151cd1db6a..421c4552497ca5f7fcfb51f369695a03ca576a85 100644 (file)
@@ -1570,11 +1570,8 @@ namespace VISU {
        anActors->InitTraversal();
        while (vtkActor *anAct = anActors->GetNextActor()) {
          if (VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(anAct)) {
-           VISU::Prs3d_i* aPrs3d  = anActor->GetPrs3d();
-           if (anActor->GetVisibility() && aPrs3d) {
-             aPrs3d->Update();
-             aPrs3d->UpdateActor(anActor);
-           }
+           if (anActor->GetVisibility()) 
+             anActor->UpdateFromFactory();
          }
        }
        RepaintView(myViewWindow);