From: apo Date: Tue, 31 Oct 2006 06:48:19 +0000 (+0000) Subject: Now, it is up to actor decide whether it is needed update from ActorFactory or not... X-Git-Tag: WP1_2_3_06-10-2006~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4c76dbb8b7da65d490f21f58dd851d3249bba514;p=modules%2Fvisu.git Now, it is up to actor decide whether it is needed update from ActorFactory or not (it compares time of modifications) --- diff --git a/src/OBJECT/VISU_Actor.cxx b/src/OBJECT/VISU_Actor.cxx index e2e9be32..bdd67e38 100644 --- a/src/OBJECT/VISU_Actor.cxx +++ b/src/OBJECT/VISU_Actor.cxx @@ -195,8 +195,10 @@ void VISU_Actor ::UpdateFromFactory() { - myActorFactory->UpdateActor(this); - Update(); + if(GetMTime() < myActorFactory->GetMTime()){ + myActorFactory->UpdateActor(this); + Update(); + } } void diff --git a/src/OBJECT/VISU_ActorFactory.h b/src/OBJECT/VISU_ActorFactory.h index 13bc2729..72402370 100644 --- a/src/OBJECT/VISU_ActorFactory.h +++ b/src/OBJECT/VISU_ActorFactory.h @@ -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 diff --git a/src/VISU_I/VISU_Prs3d_i.cc b/src/VISU_I/VISU_Prs3d_i.cc index cc4cc6b0..dfa1c78f 100644 --- a/src/VISU_I/VISU_Prs3d_i.cc +++ b/src/VISU_I/VISU_Prs3d_i.cc @@ -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 = "<