static int MYVTKDEBUG = 0;
#ifdef _DEBUG_
-static int MYDEBUG = 0;
+static int MYDEBUG = 1;
#else
static int MYDEBUG = 0;
#endif
{
theRenderer->RemoveActor(myAnnotationActor.GetPointer());
Superclass::RemoveFromRender(theRenderer);
-
+ myActorFactory->RemoveActor(this);
}
//----------------------------------------------------------------------------
#include <string>
#include <vtkSmartPointer.h>
#include <boost/signals/signal1.hpp>
+#include <boost/signals/trackable.hpp>
class vtkProp;
class vtkProperty;
}
//----------------------------------------------------------------------------
-class VTKOCC_EXPORT VISU_Actor : public SALOME_Actor
+class VTKOCC_EXPORT VISU_Actor :
+ public SALOME_Actor,
+ public boost::bsignals::trackable
{
public:
vtkTypeMacro(VISU_Actor,SALOME_Actor);
virtual
void
UpdateActor(VISU_Actor* theActor) = 0;
+
+ virtual
+ void
+ RemoveActor(VISU_Actor* theActor) = 0;
};
}
using namespace std;
#ifdef _DEBUG_
-static int MYDEBUG = 0;
+static int MYDEBUG = 1;
#else
static int MYDEBUG = 0;
#endif
theActor->Modified();
}
+void
+VISU::Prs3d_i
+::RemoveActor(VISU_Actor* theActor)
+{
+ if(MYDEBUG) MESSAGE("Prs3d_i::RemoveActor - this = "<<this<<"; theActor = "<<theActor);
+ myActorCollection->RemoveItem(theActor);
+}
+
void
VISU::Prs3d_i
::UpdateActors()
VISU_Actor*
CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL) = 0;
+ virtual
+ void
+ RemoveActor(VISU_Actor* theActor);
+
virtual
void
UpdateActor(VISU_Actor* theActor);
for (int i = 0, iEnd = theData.myActors.size(); i < iEnd; i++) {
if (theData.myActors[i] != 0) {
theData.myActors[i]->RemoveFromRender(aRen);
- theData.myActors[i]->Delete();
}
}
theData.myActors.clear();
for (int i = 0, iEnd = aData.myActors.size(); i < iEnd; i++) {
if (aData.myActors[i] != 0) {
aData.myActors[i]->RemoveFromRender(aRen);
- aData.myActors[i]->Delete();
}
}
aData.myActors.clear();
}
if (anActor) {
vw->RemoveActor(anActor);
- anActor->Delete();
}
}
}