From 4c76dbb8b7da65d490f21f58dd851d3249bba514 Mon Sep 17 00:00:00 2001 From: apo Date: Tue, 31 Oct 2006 06:48:19 +0000 Subject: [PATCH] Now, it is up to actor decide whether it is needed update from ActorFactory or not (it compares time of modifications) --- src/OBJECT/VISU_Actor.cxx | 6 ++++-- src/OBJECT/VISU_ActorFactory.h | 5 +++++ src/VISU_I/VISU_Prs3d_i.cc | 6 +----- src/VISU_I/VISU_View_i.cc | 7 ++----- 4 files changed, 12 insertions(+), 12 deletions(-) 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 = "<