1 // VISU OBJECT : interactive object for VISU entities implementation
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
23 // File : VISU_ViewManager_i.cc
24 // Author : Alexey PETROV
27 #include "VISU_ViewManager_i.hh"
28 #include "VISU_View_i.hh"
29 #include "VISU_Prs3d_i.hh"
30 #include "VISU_Table_i.hh"
32 #include "VISU_Actor.h"
34 #include "SUIT_Tools.h"
35 #include "SUIT_Session.h"
36 #include "SUIT_ViewWindow.h"
37 #include "SUIT_ViewManager.h"
39 #include "SVTK_ViewWindow.h"
40 #include "SVTK_ViewModel.h"
41 #include "SPlot2d_Curve.h"
42 #include "Plot2d_ViewFrame.h"
43 #include "Plot2d_ViewWindow.h"
44 #include "Plot2d_ViewModel.h"
46 #include "SalomeApp_Study.h"
47 #include "SalomeApp_Application.h"
48 #include "LightApp_SelectionMgr.h"
50 #include "SALOME_Event.hxx"
51 #include "SALOME_ListIO.hxx"
52 #include "SALOME_ListIteratorOfListIO.hxx"
54 #include <vtkCamera.h>
55 #include <vtkRenderer.h>
56 #include <vtkRenderWindow.h>
58 #include <qapplication.h>
63 static int MYDEBUG = 1;
65 static int MYDEBUG = 0;
70 struct TNewViewManagerEvent: public SALOME_Event
73 typedef SalomeApp_Application* TResult;
76 TNewViewManagerEvent (const int theStudyId):
77 myStudyId(theStudyId),
85 MESSAGE("Find application for study with id = : " << myStudyId);
86 SUIT_Session* aSession = SUIT_Session::session();
87 QPtrList<SUIT_Application> anApplications = aSession->applications();
88 QPtrListIterator<SUIT_Application> anIter (anApplications);
89 while (SUIT_Application* anApp = anIter.current()) {
91 if (SUIT_Study* aSStudy = anApp->activeStudy()) {
92 if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
93 if (_PTR(Study) aCStudy = aStudy->studyDS()) {
94 //if (myStudyName == aCStudy->Name()) {
95 if (myStudyId == aCStudy->StudyId()) {
96 myResult = dynamic_cast<SalomeApp_Application*>(anApp);
104 //MESSAGE("Error: application is not found for study : " << myStudyName);
105 MESSAGE("Error: application is not found for study with id = : " << myStudyId);
110 //===========================================================================
111 ViewManager_i::ViewManager_i(SALOMEDS::Study_ptr theStudy)
113 if(MYDEBUG) MESSAGE("ViewManager_i::ViewManager_i - "<<this);
115 //CORBA::String_var aStudyName = theStudy->Name();
116 //myApplication = ProcessEvent(new TNewViewManagerEvent(aStudyName.in()));
117 int aStudyID = theStudy->StudyId();
118 myApplication = ProcessEvent(new TNewViewManagerEvent(aStudyID));
122 ViewManager_i::~ViewManager_i()
124 if(MYDEBUG) MESSAGE("ViewManager_i::~ViewManager_i - "<<this);
128 struct TCurrentViewEvent: public SALOME_Event
130 SalomeApp_Application* myApplication;
131 typedef VISU::View_ptr TResult;
134 TCurrentViewEvent(SalomeApp_Application* theApplication):
135 myApplication(theApplication),
136 myResult(VISU::View::_nil())
143 VISU::View3D_i* aView = new View3D_i (myApplication);
144 if (aView->Create(0))
145 myResult = aView->_this();
149 VISU::View_ptr ViewManager_i::GetCurrentView(){
150 return ProcessEvent(new TCurrentViewEvent(myApplication));
154 template<class TViewFrame>
155 struct TCreateViewFrameEvent: public SALOME_Event
157 SalomeApp_Application* myApplication;
158 typedef typename TViewFrame::TInterface TInterface;
159 typedef typename TInterface::_ptr_type TResult;
162 TCreateViewFrameEvent (SalomeApp_Application* theApplication):
163 myApplication(theApplication),
164 myResult(TInterface::_nil())
171 //if (CheckStudy(myStudyDocument)) {
173 TViewFrame* pView = new TViewFrame (myApplication);
174 if (pView->Create(1)) {
175 myResult = pView->_this();
176 qApp->processEvents(); // Fix for bug 9929
183 VISU::View3D_ptr ViewManager_i::Create3DView()
185 if (MYDEBUG) MESSAGE("ViewManager_i::Create3DView");
186 return ProcessEvent(new TCreateViewFrameEvent<View3D_i>(myApplication));
189 VISU::XYPlot_ptr ViewManager_i::CreateXYPlot()
191 if (MYDEBUG) MESSAGE("ViewManager_i::CreateXYPlot");
192 return ProcessEvent(new TCreateViewFrameEvent<XYPlot_i>(myApplication));
195 class TCreateViewEvent: public SALOME_Event
198 TCreateViewEvent (SalomeApp_Application* theApplication)
199 : myApplication(theApplication)
202 SalomeApp_Application* myApplication;
205 class TCreateTableViewFrameEvent: public TCreateViewEvent
209 TCreateTableViewFrameEvent (SalomeApp_Application* theApplication,
211 TCreateViewEvent(theApplication),
213 myResult(VISU::TableView::_nil())
216 virtual void Execute()
218 //if (CheckStudy(myStudyDocument)) {
219 VISU::TableView_i* pView = new TableView_i (myApplication);
220 if (pView->Create(myTable) != NULL)
221 myResult = pView->_this();
224 typedef VISU::TableView_ptr TResult;
228 VISU::TableView_ptr ViewManager_i::CreateTableView (VISU::Table_ptr theTable)
230 if (MYDEBUG) MESSAGE("ViewManager_i::CreateTableView");
231 //return ProcessEvent(new TCreateViewFrameEvent<TableView_i>(myApplication));
232 return ProcessEvent(new TCreateTableViewFrameEvent (myApplication, theTable));
235 void ViewManager_i::Destroy (View_ptr theView)
237 class TEvent: public SALOME_Event {
240 TEvent(View_ptr theView):
243 virtual void Execute(){
244 if (!CORBA::is_nil(myView)) {
245 if (VISU::View_i* pView = dynamic_cast<VISU::View_i*>(VISU::GetServant(myView).in())) {
247 pView->_remove_ref();
253 if (MYDEBUG) MESSAGE("ViewManager_i::Destroy - " << theView->_is_nil());
254 ProcessVoidEvent(new TEvent(theView));
257 //===========================================================================
258 // VISU namespace functions
259 //===========================================================================
260 SVTK_ViewWindow* GetViewWindow (SUIT_ViewWindow* theStudyFrame)
262 return dynamic_cast<SVTK_ViewWindow*>(theStudyFrame);
265 vtkRenderer* GetRenderer (SUIT_ViewWindow* theStudyFrame)
267 return GetViewWindow(theStudyFrame)->getRenderer();
270 vtkCamera* GetCamera (SUIT_ViewWindow* theStudyFrame)
272 return GetRenderer(theStudyFrame)->GetActiveCamera();
275 void RepaintView (SUIT_ViewWindow* theViewWindow)
277 SVTK_ViewWindow* vf = GetViewWindow(theViewWindow);
278 vf->getRenderer()->ResetCameraClippingRange();
279 vf->getRenderWindow()->Render();
282 VISU_Actor* UpdateViewer (SUIT_ViewWindow* theStudyFrame, int theDisplaing, Prs3d_i* thePrs)
284 SVTK_ViewWindow* vf = GetViewWindow(theStudyFrame);
285 if (!vf) return NULL;
286 if(MYDEBUG) MESSAGE("UpdateViewer - theDisplaing = "<<theDisplaing<<"; thePrs = "<<thePrs);
287 vtkRenderer *aRen = vf->getRenderer();
288 vtkActorCollection *anActColl = aRen->GetActors();
290 VISU_Actor *anVISUActor = NULL, *aResActor = NULL;
291 for(anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL;){
292 if(anActor->IsA("VISU_Actor")){
293 anVISUActor = VISU_Actor::SafeDownCast(anActor);
294 if (thePrs == anVISUActor->GetPrs3d()) {
295 aResActor = anVISUActor;
296 if(theDisplaing < eErase)
297 aResActor->VisibilityOn();
299 aResActor->VisibilityOff();
301 if(theDisplaing > eDisplay)
302 anVISUActor->VisibilityOff();
304 anVISUActor->VisibilityOn();
309 RepaintView(theStudyFrame);
312 if(thePrs != NULL && theDisplaing < eErase){
314 anVISUActor = thePrs->CreateActor();
315 vf->AddActor(anVISUActor);
316 }catch(std::exception& exc){
317 if(MYDEBUG) INFOS(exc.what());
320 if(MYDEBUG) INFOS("Unknown exception was occured!!!");
324 RepaintView(theStudyFrame);
328 void UpdatePlot2d (Plot2d_ViewFrame *theView,int theDisplaying, Curve_i* theCurve)
330 if(MYDEBUG) MESSAGE("UpdatePlot2d - theDisplaying = " << theDisplaying);
333 QList<Plot2d_Curve> clist;
334 theView->getCurves(clist);
335 if (theDisplaying == eEraseAll) {
336 for (int i = 0; i < clist.count(); i++) {
337 if(MYDEBUG) MESSAGE("UpdatePlot2d - erasing all : curve - " << clist.at(i));
338 theView->eraseCurve(clist.at(i));
340 } else if (theDisplaying == eErase) {
342 for (int i = 0; i < clist.count(); i++) {
343 SPlot2d_Curve* aSPlot2dC = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
344 if (aSPlot2dC->hasIO() &&
345 !strcmp(aSPlot2dC->getIO()->getEntry(), theCurve->GetEntry())) {
346 if(MYDEBUG) MESSAGE("UpdatePlot2d - erasing : curve - " << aSPlot2dC);
347 theView->eraseCurve(aSPlot2dC);
351 } else if (theDisplaying == eDisplay) {
354 for (int i = 0; i < clist.count(); i++) {
355 SPlot2d_Curve* aSPlot2dC = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
356 if (aSPlot2dC->hasIO() &&
357 !strcmp(aSPlot2dC->getIO()->getEntry(), theCurve->GetEntry())) {
358 if(MYDEBUG) MESSAGE("UpdatePlot2d - displaying : curve - " << aSPlot2dC);
359 aSPlot2dC->setHorTitle( theCurve->GetHorTitle().c_str() );
360 aSPlot2dC->setVerTitle( theCurve->GetVerTitle().c_str() );
361 aSPlot2dC->setHorUnits( theCurve->GetHorUnits().c_str() );
362 aSPlot2dC->setVerUnits( theCurve->GetVerUnits().c_str() );
365 int nbPoints = theCurve->GetData( xList, yList );
366 if (nbPoints > 0 && xList && yList) {
367 aSPlot2dC->setData( xList, yList, nbPoints );
369 if (!theCurve->IsAuto()) {
370 aSPlot2dC->setLine((Plot2d_Curve::LineType)theCurve->GetLine(),
371 theCurve->GetLineWidth());
372 aSPlot2dC->setMarker((Plot2d_Curve::MarkerType)theCurve->GetMarker());
373 SALOMEDS::Color color = theCurve->GetColor();
374 aSPlot2dC->setColor(QColor((int)(color.R*255.),
376 (int)(color.B*255.)));
378 aSPlot2dC->setAutoAssign(theCurve->IsAuto());
379 theView->displayCurve(aSPlot2dC);
384 Plot2d_Curve* crv = theCurve->CreatePresentation();
385 if(MYDEBUG) MESSAGE("UpdatePlot2d - displaying : curve (new) - "<<crv );
387 theView->displayCurve( crv );
388 theCurve->SetLine( (VISU::Curve::LineType)crv->getLine(), crv->getLineWidth() );
389 theCurve->SetMarker( (VISU::Curve::MarkerType)crv->getMarker());
390 SALOMEDS::Color newColor;
391 newColor.R = crv->getColor().red()/255.;
392 newColor.G = crv->getColor().green()/255.;
393 newColor.B = crv->getColor().blue()/255.;
394 theCurve->SetColor( newColor );
395 crv->setAutoAssign( theCurve->IsAuto() );
399 } else if (theDisplaying == eDisplayOnly) {
402 for (int i = 0; i < clist.count(); i++) {
403 SPlot2d_Curve* aSPlot2dC = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
404 if (aSPlot2dC->hasIO() &&
405 !strcmp(aSPlot2dC->getIO()->getEntry(), theCurve->GetEntry())) {
406 if(MYDEBUG) MESSAGE("UpdatePlot2d - displaying only : curve - " << aSPlot2dC);
407 aSPlot2dC->setHorTitle( theCurve->GetHorTitle().c_str() );
408 aSPlot2dC->setVerTitle( theCurve->GetVerTitle().c_str() );
409 aSPlot2dC->setHorUnits( theCurve->GetHorUnits().c_str() );
410 aSPlot2dC->setVerUnits( theCurve->GetVerUnits().c_str() );
413 int nbPoints = theCurve->GetData( xList, yList );
414 if ( nbPoints > 0 && xList && yList ) {
415 aSPlot2dC->setData( xList, yList, nbPoints );
417 if ( !theCurve->IsAuto() ) {
418 aSPlot2dC->setLine((Plot2d_Curve::LineType)theCurve->GetLine(), theCurve->GetLineWidth());
419 aSPlot2dC->setMarker((Plot2d_Curve::MarkerType)theCurve->GetMarker());
420 SALOMEDS::Color color = theCurve->GetColor();
421 aSPlot2dC->setColor(QColor((int)(color.R*255.), (int)(color.G*255.), (int)(color.B*255.)));
423 aSPlot2dC->setAutoAssign(theCurve->IsAuto());
424 theView->displayCurve(aSPlot2dC);
427 theView->eraseCurve(aSPlot2dC);
431 Plot2d_Curve* crv = theCurve->CreatePresentation();
432 if(MYDEBUG) MESSAGE("UpdatePlot2d - displaying only : curve (new) - " << crv);
434 theView->displayCurve(crv);
435 theCurve->SetLine((VISU::Curve::LineType)crv->getLine(), crv->getLineWidth());
436 theCurve->SetMarker((VISU::Curve::MarkerType)crv->getMarker());
437 SALOMEDS::Color newColor;
438 newColor.R = crv->getColor().red()/255.;
439 newColor.G = crv->getColor().green()/255.;
440 newColor.B = crv->getColor().blue()/255.;
441 theCurve->SetColor(newColor);
442 crv->setAutoAssign(theCurve->IsAuto());
449 VISU_Actor* GetActor (VISU::Prs3d_i* thePrs3d, SVTK_ViewWindow* theVTKFrame)
451 vtkActorCollection *anActColl = theVTKFrame->getRenderer()->GetActors();
452 anActColl->InitTraversal();
453 while (vtkActor *anActor = anActColl->GetNextActor())
454 if (VISU_Actor* anVISUActor = dynamic_cast<VISU_Actor*>(anActor))
455 if (thePrs3d == anVISUActor->GetPrs3d())
460 struct TDeleteActorsEvent: public SALOME_Event
462 VISU::Curve_i* myPrs;
464 TDeleteActorsEvent (VISU::Curve_i* thePrs):
474 // 1. Find appropriate application (code like in TNewViewManagerEvent::Execute())
475 SALOMEDS::Study_var myStudyDocument = myPrs->GetStudyDocument();
476 SalomeApp_Application* anApp = NULL;
477 CORBA::String_var studyName = myStudyDocument->Name();
478 std::string aStudyName = studyName.in();
479 SUIT_Session* aSession = SUIT_Session::session();
480 QPtrList<SUIT_Application> anApplications = aSession->applications();
481 QPtrListIterator<SUIT_Application> anIter (anApplications);
482 while (SUIT_Application* aSUITApp = anIter.current()) {
484 if (SUIT_Study* aSStudy = aSUITApp->activeStudy()) {
485 if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
486 if (_PTR(Study) aCStudy = aStudy->studyDS()) {
487 if (aStudyName == aCStudy->Name()) {
488 anApp = dynamic_cast<SalomeApp_Application*>(aSUITApp);
498 // 2. Remove corresponding IO from selection
499 SALOMEDS::SObject_var aSObject = myPrs->GetSObject();
500 CORBA::String_var anEntry = aSObject->GetID();
502 LightApp_SelectionMgr* aSelectionMgr = anApp->selectionMgr();
503 SALOME_ListIO aListIO, aNewListIO;
504 aSelectionMgr->selectedObjects(aListIO);
506 for (SALOME_ListIteratorOfListIO it (aListIO); it.More(); it.Next()) {
507 if (it.Value()->hasEntry()) {
508 std::string aCurEntry (it.Value()->getEntry());
509 if (aCurEntry != std::string( anEntry.in() ) ) {
510 aNewListIO.Append(it.Value());
515 aSelectionMgr->setSelectedObjects(aNewListIO);
518 ViewManagerList aViewManagerList;
519 anApp->viewManagers(SVTK_Viewer::Type(), aViewManagerList);
520 QPtrListIterator<SUIT_ViewManager> anVMIter (aViewManagerList);
521 for (; anVMIter.current(); ++anVMIter) {
522 SUIT_ViewManager* aViewManager = anVMIter.current();
523 QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
524 for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
525 if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
526 if (Plot2d_ViewWindow* vw = dynamic_cast<Plot2d_ViewWindow*>(aViewWindow)) {
527 Plot2d_ViewFrame* vf = vw->getViewFrame();
528 QList<Plot2d_Curve> clist;
529 vf->getCurves(clist);
530 for (int i = 0; i < clist.count(); i++) {
531 if (SPlot2d_Curve* cu = dynamic_cast<SPlot2d_Curve*>(clist.at(i))) {
533 strcmp(cu->getIO()->getEntry(), myPrs->GetEntry()) == 0) {
539 //jfa tmp:aViewFrame->unHighlightAll();
547 void DeleteActors (VISU::Curve_i* thePrs)
550 ProcessVoidEvent(new TDeleteActorsEvent (thePrs));
552 /* // 1. Find appropriate application (code like in TNewViewManagerEvent::Execute())
553 SALOMEDS::Study_var myStudyDocument = thePrs->GetStudyDocument();
554 SalomeApp_Application* anApp = NULL;
555 CORBA::String_var studyName = myStudyDocument->Name();
556 std::string aStudyName = studyName.in();
557 SUIT_Session* aSession = SUIT_Session::session();
558 QPtrList<SUIT_Application> anApplications = aSession->applications();
559 QPtrListIterator<SUIT_Application> anIter (anApplications);
560 while (SUIT_Application* aSUITApp = anIter.current()) {
562 if (SUIT_Study* aSStudy = aSUITApp->activeStudy()) {
563 if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
564 if (_PTR(Study) aCStudy = aStudy->studyDS()) {
565 if (aStudyName == aCStudy->Name()) {
566 anApp = dynamic_cast<SalomeApp_Application*>(aSUITApp);
576 // 2. Remove corresponding IO from selection
577 SALOMEDS::SObject_var aSObject = thePrs->GetSObject();
578 CORBA::String_var anEntry = aSObject->GetID();
580 LightApp_SelectionMgr* aSelectionMgr = anApp->selectionMgr();
581 SALOME_ListIO aListIO, aNewListIO;
582 aSelectionMgr->selectedObjects(aListIO);
584 for (SALOME_ListIteratorOfListIO it (aListIO); it.More(); it.Next()) {
585 if (it.Value()->hasEntry()) {
586 std::string aCurEntry (it.Value()->getEntry());
587 if (aCurEntry != std::string( anEntry.in() ) ) {
588 aNewListIO.Append(it.Value());
593 aSelectionMgr->setSelectedObjects(aNewListIO);
596 ViewManagerList aViewManagerList;
597 anApp->viewManagers(SVTK_Viewer::Type(), aViewManagerList);
598 QPtrListIterator<SUIT_ViewManager> anVMIter (aViewManagerList);
599 for (; anVMIter.current(); ++anVMIter) {
600 SUIT_ViewManager* aViewManager = anVMIter.current();
601 QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
602 for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
603 if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
604 if (Plot2d_ViewWindow* vw = dynamic_cast<Plot2d_ViewWindow*>(aViewWindow)) {
605 Plot2d_ViewFrame* vf = vw->getViewFrame();
606 QList<Plot2d_Curve> clist;
607 vf->getCurves(clist);
608 for (int i = 0; i < clist.count(); i++) {
609 if (SPlot2d_Curve* cu = dynamic_cast<SPlot2d_Curve*>(clist.at(i))) {
611 strcmp(cu->getIO()->getEntry(), thePrs->GetEntry()) == 0) {
617 //jfa tmp:aViewFrame->unHighlightAll();
624 void DeleteActors (VISU::Prs3d_i* thePrs)
628 // 1. Find appropriate application (code like in TNewViewManagerEvent::Execute())
629 SALOMEDS::Study_var myStudyDocument = thePrs->GetStudyDocument();
630 SalomeApp_Application* anApp = NULL;
631 CORBA::String_var studyName = myStudyDocument->Name();
632 std::string aStudyName = studyName.in();
633 SUIT_Session* aSession = SUIT_Session::session();
634 QPtrList<SUIT_Application> anApplications = aSession->applications();
635 QPtrListIterator<SUIT_Application> anIter (anApplications);
636 while (SUIT_Application* aSUITApp = anIter.current()) {
638 if (SUIT_Study* aSStudy = aSUITApp->activeStudy()) {
639 if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
640 if (_PTR(Study) aCStudy = aStudy->studyDS()) {
641 if (aStudyName == aCStudy->Name()) {
642 anApp = dynamic_cast<SalomeApp_Application*>(aSUITApp);
652 // 2. Remove corresponding IO from selection
653 SALOMEDS::SObject_var aSObject = thePrs->GetSObject();
654 CORBA::String_var anEntry = aSObject->GetID();
656 LightApp_SelectionMgr* aSelectionMgr = anApp->selectionMgr();
657 SALOME_ListIO aListIO, aNewListIO;
658 aSelectionMgr->selectedObjects(aListIO);
660 for (SALOME_ListIteratorOfListIO it (aListIO); it.More(); it.Next()) {
661 if (it.Value()->hasEntry()) {
662 std::string aCurEntry (it.Value()->getEntry());
663 if (aCurEntry != std::string( anEntry.in() ) ) {
664 aNewListIO.Append(it.Value());
669 aSelectionMgr->setSelectedObjects(aNewListIO);
672 ViewManagerList aViewManagerList;
673 anApp->viewManagers(SVTK_Viewer::Type(), aViewManagerList);
674 QPtrListIterator<SUIT_ViewManager> anVMIter (aViewManagerList);
675 for (; anVMIter.current(); ++anVMIter) {
676 SUIT_ViewManager* aViewManager = anVMIter.current();
677 QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
678 for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
679 if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
680 if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
681 VISU_Actor* anActor = NULL;
682 vtkActorCollection *anActColl = vw->getRenderer()->GetActors();
683 anActColl->InitTraversal();
684 vtkActor *aVTKActor = anActColl->GetNextActor();
685 for (; !anActor && aVTKActor; aVTKActor = anActColl->GetNextActor()) {
686 if (VISU_Actor* anVISUActor = dynamic_cast<VISU_Actor*>(aVTKActor)) {
687 if (thePrs == anVISUActor->GetPrs3d()) {
688 anActor = anVISUActor;
693 vw->RemoveActor(anActor);